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. The Lounge
  3. VS 2010 nitpick [modified]

VS 2010 nitpick [modified]

Scheduled Pinned Locked Moved The Lounge
csharpasp-netvisual-studio
12 Posts 6 Posters 2 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.
  • P PIEBALDconsult

    When you create an empty project, it has no references, as it shouldn't, but you can't then add a reference to System.Core -- nor does it matter, System.Core will be referenced whether you want it or not. VS 2008 works "properly". Clarification: This is regarding C# projects; it probably applies to VB as well. Edit: I was able to edit the project file(s) to add the references. I still haven't found where System.Core is automatically referenced.

    modified on Friday, May 7, 2010 12:51 PM

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

    Two questions then: 1. What happens when you create an empty project in VS2008, then have 2010 convert it? If that works properly, you might want to keep one empty project around forever. 2. Can't you just modify some template so an empty project is even emptier? or create your own? :)

    Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


    Prolific encyclopedia fixture proof-reader browser patron addict?
    We all depend on the beast below.


    P 1 Reply Last reply
    0
    • L Luc Pattyn

      Two questions then: 1. What happens when you create an empty project in VS2008, then have 2010 convert it? If that works properly, you might want to keep one empty project around forever. 2. Can't you just modify some template so an empty project is even emptier? or create your own? :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      Prolific encyclopedia fixture proof-reader browser patron addict?
      We all depend on the beast below.


      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #3
      1. I don't feel like trying that at this time. 2) Doubtful, unless it's a matter of the .targets file (or something) having System.Core hard-coded. But I think the main problem is that VS 2010 has some exceptional handling for System.Core -- and that's not good.
      L 1 Reply Last reply
      0
      • P PIEBALDconsult
        1. I don't feel like trying that at this time. 2) Doubtful, unless it's a matter of the .targets file (or something) having System.Core hard-coded. But I think the main problem is that VS 2010 has some exceptional handling for System.Core -- and that's not good.
        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #4

        there are some csproj files inside C:\Program Files\Microsoft Visual Studio 10.0\ImportProjects\vcs that may or may not interest you. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


        Prolific encyclopedia fixture proof-reader browser patron addict?
        We all depend on the beast below.


        P 1 Reply Last reply
        0
        • L Luc Pattyn

          there are some csproj files inside C:\Program Files\Microsoft Visual Studio 10.0\ImportProjects\vcs that may or may not interest you. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          Prolific encyclopedia fixture proof-reader browser patron addict?
          We all depend on the beast below.


          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #5

          Having System.Core in the template for non-empty projects is fine, and excluding it from the empty template is fine, but not allowing the user to add a reference to one particular DLL of many is improper. Even with a regular project, you can remove the reference, but you can't add it back in. I expect I can edit the project file to add the reference, but I shouldn't need to. It should probably be handled the same as mscorlib.

          modified on Thursday, May 6, 2010 11:29 PM

          L 1 Reply Last reply
          0
          • P PIEBALDconsult

            Having System.Core in the template for non-empty projects is fine, and excluding it from the empty template is fine, but not allowing the user to add a reference to one particular DLL of many is improper. Even with a regular project, you can remove the reference, but you can't add it back in. I expect I can edit the project file to add the reference, but I shouldn't need to. It should probably be handled the same as mscorlib.

            modified on Thursday, May 6, 2010 11:29 PM

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

            I think you're right, but I'm not sure; so far I haven't cared much about which DLLs get referenced automatically. I wonder what Scott Dorman would say about this, I expect he has the answer to such matters. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            Prolific encyclopedia fixture proof-reader browser patron addict?
            We all depend on the beast below.


            1 Reply Last reply
            0
            • P PIEBALDconsult

              When you create an empty project, it has no references, as it shouldn't, but you can't then add a reference to System.Core -- nor does it matter, System.Core will be referenced whether you want it or not. VS 2008 works "properly". Clarification: This is regarding C# projects; it probably applies to VB as well. Edit: I was able to edit the project file(s) to add the references. I still haven't found where System.Core is automatically referenced.

              modified on Friday, May 7, 2010 12:51 PM

              S Offline
              S Offline
              Scott Dorman
              wrote on last edited by
              #7

              I agree, it does seem like a bad design choice. That being said, this is actually a bug (at least in my opinion) in the project template used for an empty project. If you look at the template for a Windows Forms project, it includes the following:

              <ItemGroup>
              	<Reference Include="System"/>
              	$if$ ($targetframeworkversion$ >= 3.5)
              	<Reference Include="System.Core"/>
              	<Reference Include="System.Xml.Linq"/>
              	<Reference Include="System.Data.DataSetExtensions"/>
              	$endif$
              	$if$ ($targetframeworkversion$ >= 4.0)
              	<Reference Include="Microsoft.CSharp"/>
              	$endif$
              	<Reference Include="System.Data"/>
              	<Reference Include="System.Deployment"/>
              	<Reference Include="System.Drawing"/>
              	<Reference Include="System.Windows.Forms"/>
              	<Reference Include="System.Xml"/>
              </ItemGroup>
              

              Looking at the project template for an empty project, there is no such ItemGroup. You could modify the template to include one, but I'm not sure it's worth the trouble.

              Scott Dorman

              Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


              Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

              P 1 Reply Last reply
              0
              • S Scott Dorman

                I agree, it does seem like a bad design choice. That being said, this is actually a bug (at least in my opinion) in the project template used for an empty project. If you look at the template for a Windows Forms project, it includes the following:

                <ItemGroup>
                	<Reference Include="System"/>
                	$if$ ($targetframeworkversion$ >= 3.5)
                	<Reference Include="System.Core"/>
                	<Reference Include="System.Xml.Linq"/>
                	<Reference Include="System.Data.DataSetExtensions"/>
                	$endif$
                	$if$ ($targetframeworkversion$ >= 4.0)
                	<Reference Include="Microsoft.CSharp"/>
                	$endif$
                	<Reference Include="System.Data"/>
                	<Reference Include="System.Deployment"/>
                	<Reference Include="System.Drawing"/>
                	<Reference Include="System.Windows.Forms"/>
                	<Reference Include="System.Xml"/>
                </ItemGroup>
                

                Looking at the project template for an empty project, there is no such ItemGroup. You could modify the template to include one, but I'm not sure it's worth the trouble.

                Scott Dorman

                Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #8

                Scott Dorman wrote:

                not sure it's worth the trouble

                Indeed, because it will be created once you add a reference anyway. My complaint concerns the special handling of System.Core. P.S. Also that it is "correct" in 2008, but it was changed in 2010.

                R 1 Reply Last reply
                0
                • P PIEBALDconsult

                  Scott Dorman wrote:

                  not sure it's worth the trouble

                  Indeed, because it will be created once you add a reference anyway. My complaint concerns the special handling of System.Core. P.S. Also that it is "correct" in 2008, but it was changed in 2010.

                  R Offline
                  R Offline
                  Roger Wright
                  wrote on last edited by
                  #9

                  Now that you've played with it a while, is there any compelling reason to switch to VS2010 that you can see? Now that there's an upgrade path for Standard Edition users, I've been toying with upgrading. But there are a whole lot of other things I could be doing with $300 that need doing. :)

                  "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                  P 1 Reply Last reply
                  0
                  • R Roger Wright

                    Now that you've played with it a while, is there any compelling reason to switch to VS2010 that you can see? Now that there's an upgrade path for Standard Edition users, I've been toying with upgrading. But there are a whole lot of other things I could be doing with $300 that need doing. :)

                    "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                    P Offline
                    P Offline
                    PIEBALDconsult
                    wrote on last edited by
                    #10

                    Oh, look, it's Thursday -- get thee to the Riverside. :cool: Not really; I'm using 2008 Pro on my desktop PC, and 2010 Express on the wife's laptop. I might not register it after the thirty day evaluation period. I do like that the add reference dialog is quicker. I tried an optional parameter, but didn't need it. If I had $300 to blow, I might buy it, I see no reason for the average Joe to have MSDN. At this time I see no compelling reason even to install Express on my desktop PC. If I install Express and later get Pro I don't know how the install would go, so I'll hold off for now. If someone gave me a free copy of 2010 Pro I'd probably install it, but it's not a priority.

                    1 Reply Last reply
                    0
                    • P PIEBALDconsult

                      When you create an empty project, it has no references, as it shouldn't, but you can't then add a reference to System.Core -- nor does it matter, System.Core will be referenced whether you want it or not. VS 2008 works "properly". Clarification: This is regarding C# projects; it probably applies to VB as well. Edit: I was able to edit the project file(s) to add the references. I still haven't found where System.Core is automatically referenced.

                      modified on Friday, May 7, 2010 12:51 PM

                      P Offline
                      P Offline
                      peterchen
                      wrote on last edited by
                      #11

                      dance little tester, dance! :jig: :jig: :jig: Err, I would like to encourage you to post your findings on Microsoft Connect[^], and follow through with the bureocratic obstacles implemented to test your seriousness.

                      Agh! Reality! My Archnemesis![^]
                      | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

                      1 Reply Last reply
                      0
                      • P PIEBALDconsult

                        When you create an empty project, it has no references, as it shouldn't, but you can't then add a reference to System.Core -- nor does it matter, System.Core will be referenced whether you want it or not. VS 2008 works "properly". Clarification: This is regarding C# projects; it probably applies to VB as well. Edit: I was able to edit the project file(s) to add the references. I still haven't found where System.Core is automatically referenced.

                        modified on Friday, May 7, 2010 12:51 PM

                        N Offline
                        N Offline
                        NormDroid
                        wrote on last edited by
                        #12

                        I suppose that's true for a managed project.

                        Two heads are better than one.

                        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