Last post Mar 05, 2012 12:12 AM by chatre
Mar 04, 2012 01:41 AM|chatre|LINK
My situation: Trying to convert a program written in msvc# 2010 Express to run in webmatrix
I. I created an empty website in webmatrix
a. created a Bin folder and added muparser.dll and muparser.lib to it by Right-Click on Bin folder then chose "Add Existing file..."
b. created a App_Code and added muParser.cs to it by Right-Click on App_Code folder then chose "Add Existing file..."
1. the content of muParser.cs
II. Created a empty cshtml file
a. Added @using muParser
III. Error message: Compiler Error Message: CS0246: The type or namespace name 'muParser' could not be found (are you missing a using directive or an assembly reference?)
IV. How do I resolve this?
Thank you for your assistance,
Edit 1: 3/4/2012: a. Specify the way to add files into project.
b. Specify the C# name.
Mar 04, 2012 06:13 AM|bluesherpa|LINK
Right-click on the references folder, add reference, and browser to your DLL. This will attach it to the project - copying the file to the bin folder isn't enough.
Mar 04, 2012 07:20 AM|chatre|LINK
Could you be more specific? After creating Bin and App_Code folders, I did Right-Clicks on them and chose "Add Existing File..." I didn't see the "Add reference" option at all.
Mar 04, 2012 07:40 PM|bluesherpa|LINK
When I create a project in Visual Studio, it automatically has the References folder that you right click on to add more references. When you open the folder, it shows items like Entity Framework, Microsoft.CSharp, System, etc.. Does your project have this?
Mar 04, 2012 09:26 PM|chatre|LINK
WebMatrix doesn't have "References" folder, it only has "Bin" folder. All DLLs are supposed to be in "Bin" folder? Any comments/suggestions are welcome.
Mar 04, 2012 09:35 PM|bluesherpa|LINK
Select Add reference from the Project Menu, click the Browse button, find your dll, and click ok.
Here's a page that has screenshots
Mar 04, 2012 10:10 PM|chatre|LINK
My MS WebMatrix doesn't look like that at all. It looks like in this
Mar 04, 2012 11:13 PM|bluesherpa|LINK
You might be trying to do more than WebMatrix supports. Check out Visual Studio Express.
Mar 04, 2012 11:39 PM|GmGregori|LINK
"The Bin folder is used for managed-code assemblies, not for native-code (unmanaged-code) assemblies" from
Shared Code Folders in ASP.NET Web Site Projects.
Is it possible that this is your case?
Mar 05, 2012 12:12 AM|chatre|LINK
Thank bluesherpa and GmGregori. I added unmanaged-code assemblies to the Bin folder .