Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Yeah, I try to get the c# DLL work in Visual Studio. There is an explanation in your answer, but it didn´t help. I get the following error Message:

It appears that there was an error accessing the C# SWIG Bindings for OpenStudio. Note that the libraries installed in <installdir>/CSharp/openstudio need to be accessible to this application at runtime, either through the path or in the same directory as the exe. Nothing else will work properly have this point. Error Text: It was tried to import a file in a wrong format. (Except HRESULT: 0x8007000B)

I also tried to copy all of the dll to the project/bin and renew the reference. But the same error occured. What can I do, to make the DLL work in Visual Studio?

Yeah, I try to get the c# DLL work in Visual Studio. There is an explanation in your answer, but it didn´t help. I get the following error Message:

It appears that there was an error accessing the C# SWIG Bindings for OpenStudio. Note that the libraries installed in <installdir>/CSharp/openstudio need to be accessible to this application at runtime, either through the path or in the same directory as the exe. Nothing else will work properly have this point. Error Text: It was tried to import a file in a wrong format. (Except HRESULT: 0x8007000B)

I also tried to copy all of the dll to the project/bin and renew the reference. But the same error occured. What can I do, to make the DLL work in Visual Studio?

Yeah, I try to get the c# DLL work in Visual Studio. There is an explanation in your answer, but it didn´t help. I get the following error Message:

It appears that there was an error accessing the C# SWIG Bindings for OpenStudio. Note that the libraries installed in <installdir>/CSharp/openstudio need to be accessible to this application at runtime, either through the path or in the same directory as the exe. Nothing else will work properly have this point. Error Text: It was tried to import a file in a wrong format. (Except HRESULT: 0x8007000B)

I also tried to copy all of the dll to the project/bin and renew the reference. But the same error occured. What can I do, to make the DLL work in Visual Studio?

Now I change the settings of my project and add a reference to the OpenStudio/Csharp/openstudio Folder and the error Message is not shown. BUT when I try to make a simple model with only one construction and building and save this, nothing happens. There is no error message, but the osm. file doesn´t exist. I used this:

OpenStudio.Model model = new OpenStudio.Model();
....
model.save(new OpenStudio.Path(path),true);

Yeah, I try to get the c# DLL work in Visual Studio. There is an explanation in your answer, but it didn´t help. I get the following error Message:

It appears that there was an error accessing the C# SWIG Bindings for OpenStudio. Note that the libraries installed in <installdir>/CSharp/openstudio need to be accessible to this application at runtime, either through the path or in the same directory as the exe. Nothing else will work properly have this point. Error Text: It was tried to import a file in a wrong format. (Except HRESULT: 0x8007000B)

I also tried to copy all of the dll to the project/bin and renew the reference. But the same error occured. What can I do, to make the DLL work in Visual Studio?

Now I change the settings of my project and add a reference to the OpenStudio/Csharp/openstudio Folder and the error Message is not shown. BUT when I try to make a simple model with only one construction and building and save this, nothing happens. There is no error message, but the osm. file doesn´t exist. I used this:

OpenStudio.Model model = new OpenStudio.Model();
....
model.save(new OpenStudio.Path(path),true);

Yeah, I try to get the c# DLL work in Visual Studio. There is an explanation in your answer, but it didn´t help. I get the following error Message:

It appears that there was an error accessing the C# SWIG Bindings for OpenStudio. Note that the libraries installed in <installdir>/CSharp/openstudio need to be accessible to this application at runtime, either through the path or in the same directory as the exe. Nothing else will work properly have this point. Error Text: It was tried to import a file in a wrong format. (Except HRESULT: 0x8007000B)

I also tried to copy all of the dll to the project/bin and renew the reference. But the same error occured. What can I do, to make the DLL work in Visual Studio?

Now I change the settings of my project and add a reference to the OpenStudio/Csharp/openstudio Folder and the error Message is not shown. BUT when I try to make a simple model with only one construction and building and save this, nothing happens. There is no error message, but the osm. file doesn´t exist. I used this:

OpenStudio.Model model = new OpenStudio.Model();
....
model.save(new OpenStudio.Path(path),true);