开发者

compile specifically for .net 2.0 runtime in VS2010?

I have a bunch of old VB.NET code, written o开发者_运维技巧riginally on VS2005, and now I no longer have the license. I downloaded VS2010 free edition, and I just want to apply a relatively minor patch to an assembly/DLL. This particular DLL is being used by an existing Windows service (also written in VB.NET), and it's the server side implementation of a TCP remoting implementation.

So I need my patched code to be compatible with it all of this. When I naively tried to just build under VS2010, drop the DLL in place, and restart the service, it bails with some error about bad magic number or something. (I'm assuming because it's .NET 3.0 and the .NET 2.0 runtime has no idea how to deal with that).

Sorry for the long lead up, but I'm hoping there's some way in VS to say, 'build this as a .NET 2.0 assembly'. If this isn't possible, what are my options?


Yep go to "My Project" > "Compile" > "Advanced Compile Options" > "Target Framework" and change to ".NET Framework 2.0"

If this doesn't help, what is the actual error that you are getting?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜