简体   繁体   中英

Will open-source code written in net 3.5 work in Visual Studio 2010 net 4? Do I just upload the files?

I have an open-source code for a secured login portal written on the asp.net 3.5 framework. If I have Visual Studio 2010 Ultimate (vb), will I be able to use this source code, and will VS update the necessary coding? In other words, can I just plug the pages into my VS solution and be all set, or do I have more work to do? Thanks!

Will VS update the necessary code? Yes. Follow this guideline to upgrade your application from 2.0, 2.5, or 3.5 to 4.0.

http://msdn.microsoft.com/en-us/library/dd483478.aspx

However there will be one major change and that is your web.config file. It will look totally different.

While your 3.5 web config file can have hundreds of lines of code, your 4.0 file could look like this

     <?xml version="1.0"?>
    <configuration>
        <system.web>
            <compilation targetFramework="4.0" /> 
        </system.web>
    </configuration>

and thats it. You will have to configure your machine.config.file which will contain a lot of the settings from your 3.5 file. But the guidelines will explain this.

Let it screw up just try and see. Find samples/tutorials of how to use the code. But before you do anything make sure you are working on a copy of your website/project not the original. Back up, Back up, always.., restoring is so easy then specially when you are new to coding.

The first think to do when you want to use code (actually not your own) find out what it does, how to use it. The next thing is to import dll files into your project. For the rest see the samples and tutorials you got.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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