VS 2010 nitpick [modified]
-
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.
- 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.
-
- 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.
there are some
csproj
files insideC:\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.
-
there are some
csproj
files insideC:\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.
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
-
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
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.
-
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
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
-
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
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.
-
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.
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"
-
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"
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.
-
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
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. -
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