Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Switching between .net 1 and 2 ?

Switching between .net 1 and 2 ?

Scheduled Pinned Locked Moved C#
csharpquestionvisual-studiohelp
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nemopeti
    wrote on last edited by
    #1

    Hi! I use VS 2005, and C#. If framework 1 and framework 2 installed, in a project I use only .net 1 compatible thinks, but when I compile the executable, and transfer it to a machine witch haven't got .net 2, gon erro message. How can I adjust my project to require only .net 1? Thanks for help.

    P 1 Reply Last reply
    0
    • N nemopeti

      Hi! I use VS 2005, and C#. If framework 1 and framework 2 installed, in a project I use only .net 1 compatible thinks, but when I compile the executable, and transfer it to a machine witch haven't got .net 2, gon erro message. How can I adjust my project to require only .net 1? Thanks for help.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Unfortunately for you, VS 2005 targets .NET 2 only. In other words, you can't develop .NET 1 applications with it. What you could do is to create an installer for your application which installs the .NET Framework 2 Redistributable on the client.

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      L E 2 Replies Last reply
      0
      • P Pete OHanlon

        Unfortunately for you, VS 2005 targets .NET 2 only. In other words, you can't develop .NET 1 applications with it. What you could do is to create an installer for your application which installs the .NET Framework 2 Redistributable on the client.

        the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
        Deja View - the feeling that you've seen this post before.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Really ? I thought that by changing some setting (I would guess inside AssemblyInfo.cs or maybe in a manifest file) one could tell .NET that the preferred version would be 2.0 but if that was not available .NET 1.1 (or 1.0) could be used instead. Of course as soon as some 2.0 specific feature would get accessed, it would throw when running on 1.x I dont know the details but would like to know more about it... Greetings,

        Luc Pattyn

        P 1 Reply Last reply
        0
        • L Luc Pattyn

          Really ? I thought that by changing some setting (I would guess inside AssemblyInfo.cs or maybe in a manifest file) one could tell .NET that the preferred version would be 2.0 but if that was not available .NET 1.1 (or 1.0) could be used instead. Of course as soon as some 2.0 specific feature would get accessed, it would throw when running on 1.x I dont know the details but would like to know more about it... Greetings,

          Luc Pattyn

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          There is a way of doing it, but it means that you have to compile up outside of Visual Studio. VS2005 uses the .NET 2 compiler. Providing that you haven't used any of the .NET2 features such as partial classes etc..., then you can actually compile the application from the command line using the .NET 1.1 csc.exe compiler. It's not neat, but it does work.

          the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
          Deja View - the feeling that you've seen this post before.

          W 1 Reply Last reply
          0
          • P Pete OHanlon

            There is a way of doing it, but it means that you have to compile up outside of Visual Studio. VS2005 uses the .NET 2 compiler. Providing that you haven't used any of the .NET2 features such as partial classes etc..., then you can actually compile the application from the command line using the .NET 1.1 csc.exe compiler. It's not neat, but it does work.

            the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
            Deja View - the feeling that you've seen this post before.

            W Offline
            W Offline
            Wayne Phipps
            wrote on last edited by
            #5

            I hate to swear in a forum where most people use Visual Studio but here goes... How about SharpDevelop? It can target either .net 1.1, .net 2.0, Boo and Mono. It can also import projects from Visual Studio. It doesn't claim to be a replacement for VS but maybe it's worth a try.

            Regards Wayne Phipps ____________ Time is the greatest teacher... unfortunately, it kills all of its students View my Blog

            1 Reply Last reply
            0
            • P Pete OHanlon

              Unfortunately for you, VS 2005 targets .NET 2 only. In other words, you can't develop .NET 1 applications with it. What you could do is to create an installer for your application which installs the .NET Framework 2 Redistributable on the client.

              the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
              Deja View - the feeling that you've seen this post before.

              E Offline
              E Offline
              ednrgc
              wrote on last edited by
              #6

              Check out MSBEE.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups