开发者

Problem using aspnet_compiler with VS2010 project to build assemblies for .NET 3.5

I'm trying to use aspnet_compile.exe to compile an ASP.NET web application. The command I'm using looks like this:

aspnet_compiler.exe -f -c -p PATH_TO_WEB_APP -v /
-fix开发者_开发百科ednames -errorstack PATH_TO_DESIRED_FOLDER  

This used to be working fine, but I'm trying to migrate the projects involved from VS2008 to VS2010. But, I don't want to upgrade all of the projects to .NET 4 (yet). So they are all working in VS2010 against .NET 3.5 and building just fine through there normally.

But, when I issue the aspnet_compiler command (using the 2.0 version of the compiler), I get the following.

error ASPCONFIG: Could not load file or assembly 'ASSEMBLY_NAME' 
or one of its dependencies. This assembly is built by a runtime newer than
the currently loaded runtime and cannot be loaded.

But if I try to use the new aspnet_compiler included with VS2010, it builds with .NET 4, and then the created assemblies can't be used by the rest of the 3.5 assemblies.

So my question: how do I use aspnet_compiler against a VS2010 web application project, while still having it built for .NET 2.0/3.5?


%windir%\Microsoft.NET\Framework\v2.0.50727

Look here for more info:

http://msdn.microsoft.com/en-us/library/ms229863.aspx#findingthecorrectversion

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜