简体   繁体   English

VS2008上的“无法在对象浏览器中查看此项目”-ASP.NET C#v4.0

[英]“This project cannot be viewed in object browser” on VS2008 - ASP.NET C# v4.0

I have an application that compiles some code dynamically, and creates an assembly as well. 我有一个可以动态编译一些代码并创建程序集的应用程序。

I use the CodeDomProvider class with the CompilerParameters class in order to compile the files. 我将CodeDomProvider类与CompilerParameters类一起使用,以便编译文件。

I add references with the ReferencedAssemblies.Add() method, and I need to add adittional assemblies as well (MyApp.dll) - And as far as I understanded, this is the source of the problem. 我使用ReferencedAssemblies.Add()方法添加引用,并且还需要添加附加程序集(MyApp.dll)-据我了解,这是问题的根源。

In the CompilerResults > Errors, there are no errors in the output of the compilation, BUT, 在CompilerResults>错误中,编译输出BUT中没有错误,

When I add the above created assembly to an application, it is added with a "!" 当我将上面创建的程序集添加到应用程序中时,它带有“!” mark on it, and the namespaces within it aren't recognized at all, and it cannot be accessed by the object browser as well. 在其上标记,并且根本无法识别其中的名称空间,并且对象浏览器也无法访问它。

Can someone point me to my problem\\mistake? 有人可以指出我的问题\\错误吗?

I hope I was clear enough, my English isn't perfect at all, and this whole subject is a little bit complicated to explain. 我希望我足够清楚,我的英语一点也不完美,而且整个主题的解释有点复杂。

Thanks alot in advance! 在此先多谢!

Gal. 加尔。

It's not really clear what's going on, but my suspicion based on your question title is that you're compiling an assembly against .NET 4, but then trying to use it in a .NET 3.5 project. 目前尚不清楚发生了什么,但是基于您的问题标题 ,我怀疑您是针对.NET 4编译程序集,然后尝试在.NET 3.5项目中使用它。 That won't work. 那行不通。 You'll need to build your assembly against 3.5. 您将需要针对3.5构建程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM