Hello
I'm using scons to generate Visual Studio 2005 project files ( sln, vcproj ). When I open it right after generation everything is ok. The problem starts when I try to open sln file for the second time. Visual Studio 2005 is telling me that project need to be converted to 2005 format because somehow it is recognized as 2003 .NET. I discovered that after I close Visual Studio for the first time it saves *.user file right next to vcproj file. When I deleted *.user file and tried to open sln file once again everything worked ok.
My question is how to force VS 2005 not to generate *.user files. What are those files ?
In the past I was using scons to build VS 2003 .NET sln files and everything was ok.
Why it is being generated ?
Best Regards
Lukasz
Yes there is after conversion I got error that project can not be converted and there were errors found during conversion. The weirdest thing for me is how the project can be treated as 2005 project for the first time but not for the second time I open the sln file. There must be some extra stuff written somewhere that messes with the sln or vcproj file.
Related
Is there a way to change where visual studio looks for project files(.vcxproj)? So I can keep all visual studio related files in separate VS folder and have my project still open and save correctly in visual studio.
I figured it out. I can open up visual studio's solution file (.sln) in notepad and edit the path to the project file there. It's can be done on this line:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Solution", "Project/Project.vcxproj", "{E3671A4E-1047-4D41-8AF1-EA19EAC2C601}"
So right now the .sln file is looking for the project file within 'Project/'. All I have to do is change the path here in relation to the solution file.
I found something strange when i was building a project, after I built my project, I can get the latest output file (.exe) and then I tried building the project again.
As far as I know, at this time visual studio won't make a new output file again, but it made a newer file again even though I didn't modify any source codes.
Why is this happening?
as i know, at this time visual studio must not make a new output file again.
Visual Studio rebuilds the file even if there are no code changes.
Visual Studio does not recompile if there no changes, but always generates (build) a new executable.
Is there a way to open a solution-file saved in Visual studio 2010 beta 2 in Visual studio 2008?
... or maybe a way to convert it?
When i tried to open it in VS 2008 i get an error saying "The selected file is a solution file, but was created by a newer version of this application and cannot be opened."
If you open up the .csproj file in a text editor (it's just XML) you'll see a line like:
<ProductVersion>9.0.30729</ProductVersion>
(this is from a VS 2008 project)
The first line of a 2008 .sln file reads as follows:
Microsoft Visual Studio Solution File, Format Version 10.00
The 2010 version numbers will be different - just change them to these values (or the ones you get from creating a new 2008 project on your system).
Just take a backup of the files first.
It is not a supported scenario to open a .sln file created with 2010 in 2008. This is true for trying to open any .sln file saved in a newer version of Visual Studio with an older one.
What you can do is open up the .sln file in notepad and decrement the version number by 1. This will allow you to open the .sln file but the operation will still likely fail as you'll have to convert all of the projects as well.
I fought with this very problem today. What I did was create a VS2008 project and simply added in the files from the other project. Most code written in 2010 really doesn't use 2010 features--at least for the code I was looking at it imported the files without any problems.
Visual Studio's project and solution files are plain text.
You need to open the .sln and .csproj files in a text editor, compare the VS2010 versions to VS2008 versions, and modify the version numbers to match.
You'd have to compare the .sln and .*proj files schemas between the versions. I know that the structure is dramatically different from 2003 to 2008. In the end, you are better off creating a new project and copying the files over between the two
Why not create a new VS2008 solution manually and add in the source code instead of hacking at the .sln file. Remember VS2010 is early beta and not ready and the timeline for release has been pushed back due to the growing number of people complaining about it.
Hope this helps,
Best regards,
Tom.
While what other users have stated is true, if the project contains or (may not be 100% exact but look for something along those lines)
You will need to remove them as the syntax for 3.5 client, and 4.0 client is different in VS2010, than in 2008.
For two of my VS 2005 C++ projects, VS wants to write to the .sln file when I build the projects. I have got a number of other VS 2005 C++ projects where this is not the case. It is a problem as due to the fact that we have ClearCase source control integrated with our VS 2005 installations and when we try and run an overnight build via batch files, the build pauses as a ClearCase check out dialog box is displayed.
Looking at what VS is changing in the .sln files, it is the second GUID on the project line.
Before building:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterCommClientB", "InterCommClientB.vcproj", "{A2AF232A-7F27-4340-81D5-8ABFD10994D2}"
After building:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterCommClientB", "InterCommClientB.vcproj", "{67BE85B7-3234-484E-88FB-4F0E42096583}"
Any help gratefully received. I am new to VS 2005, as we have only recently migrated from VC++ 6.0, so apologies if I have missed something obvious.
We are running VS 2005 Professional Edition, with SP1 installed.
Regards,
Greg.
I had similar problem. It seems that when converting projects from old versions of VS (like 6 or 2003) VS 2010 is not adding Project GUID to the .vcxproj file. Because of that when you open solution including such project VS will recreate GUID for such project, and will change .sln file but will not change .vcxproj file. So another time you open such solution the situation will be the same and the .sln file may change again.
See this: http://connect.microsoft.com/VisualStudio/feedback/details/586258/missing-projectguid-in-vcxproj-files
I am guessing here, but it looks like some changes have been made to the InterCommClientB project(project, not the files in the project). When this happens the sln is updated, in this case only the project GUID.
My best guess to resolve this issue would be to manually build the solution and then checkin the changes. This way the sln file won't change on build.
My second best guess is that you already made this changes at your computer and it is working fine, but you did not get lattest version on the pc where you do the night build .
This might be totally out there - but sometimes Visual Studio fails to check-in a Solution file when it's been modified and while the Solution is open in Visual Studio. Try closing Visual Studio, and only then committing the Solution file.
If it isn't that, there might be some other agency causing the Solution file to need to change the GUIDs its using. In one instance, I was using .NET tools from National Instruments, and they has a licensing scheme that would trigger that sort of action (modification of extraneous files for not good reason) whenever I went to do a rebuild.
Please take a careful look at the output from the build (in the log, or the output window) - you may find some further clues there!
We have a solution that has a website and a class library. We also have developers working in VS 2005 and VS 2008. The issue is when a user adds a file/removes a file from the class library it doesn't get added to the project file for the user(s) using the other version of VS. Also I had to setup our automated build to use one project file. Is there a way to work around this or do we need to upgrade everyone to 2008?
Working with two different version of Visual Studio in a team of more than one project member absolutely makes no sense. I recommend to downgrade to Visual Studio 2005 or upgrade to Visual Studio 2008. You can install several versions of Visual Studio on the same machine with no side effects.
You will need to keep each solution file on the same visual studio version. It's ok to split up your product into several solutions though. In this case you may have 1 .sln file that holds your 2005 projects and 1 .sln that holds your 2008 projects.
As you mentioned there is no automatic way to keep a 2005 and a 2008 project in sync, because when you add a file to one of the projects, the other one won't have that new file. Likewise when you remove files.
Maybe you should downgrade to VS 2005 - since I'm working now on a project using VS08 and every now and then the paths of the referenced dlls get mixed up and the dlls are lost - or we have the same problem you just described that files that were added from one user are not in the project file for the next one after an update.
I'm not sure about "Web Site" (rather than "Web Application") projects, but generally you don't need different project files for 2005 and 2008. You only need separate solution files.
Just open your 2005 project in 2008 and allow it to upgrade your solution/projects. You may get a dialog asking you to update CLR versions, just say no.
Once you've got a working 2008 solution, copy the *.sln file to another name (I call my copy *.2005.sln), open the copied *.sln file in notepad, or your favourite text editor. Find "Format Version 10.0" on the 2nd line, and change to "Format Version 9.0". Save the file.
That's it, your upgraded solution file works in VS 2008, and the one you copied and changed works in VS 2005.
There's one extra step if you've got Web Application Projects. In the Web Application's vbproj or csproj file, find the line:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplications.targets" Condition="" />
and replace that one line with these two:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplications.targets" Condition="'$(Solutions.VSVersion)' == '8.0'" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplications.targets" Condition="'$(Solutions.VSVersion)' == '9.0'" />
Those two lines will conditionally select the correct MSBuild path depending on the version of VS used.