Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Manually creating a .sln file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Dent - 07 Jan 2005 18:24 GMT
Hi,

Due to a project I am working in, I need to generate a solution file
automatically that includes one C# project. I have taken the format for that
.sln file from existing solution files created by VS.NET 2003. I only
generate two new GUIDs. This is the template that I use:
-----------------------
Microsoft Visual Studio Solution File, Format Version 8.00
Project("CS_GP_PackageGUID") = "CS_GP_OriginalProjName",
"CS_GP_OriginalProjName.csproj", "CS_GP_ProjectGUID"
    ProjectSection(ProjectDependencies) = postProject
    EndProjectSection
EndProject
Global
    GlobalSection(SolutionConfiguration) = preSolution
        Debug = Debug
        Release = Release
    EndGlobalSection
    GlobalSection(ProjectConfiguration) = postSolution
        CS_GP_ProjectGUID.Debug.ActiveCfg = Debug|.NET
        CS_GP_ProjectGUID.Debug.Build.0 = Debug|.NET
        CS_GP_ProjectGUID.Release.ActiveCfg = Release|.NET
        CS_GP_ProjectGUID.Release.Build.0 = Release|.NET
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
    EndGlobalSection
    GlobalSection(ExtensibilityAddIns) = postSolution
    EndGlobalSection
EndGlobal
---------
I replace CS_GP_PackageGUID with a generated GUID and CS_GP_ProjectGUID with
another. The first GUID is for the solution and the second for the project.

When I try to open the .sln file with VS.NET, I get a message "The
application for project '...' is not installed. Make sure the application for
the project type (.csproj) is installed".

And the only way to incorporate the project in the solution is to open it
with VS.NET and remove it and reload it.  This changes the first GUID
(CS_GP_PackageGUID). After that the project is incorportated correctly into
the solution.

It seems to me that the GUID needs to be generated by the solution.
But, there should be a way to force it to accept a GUID provided by me or to
somehow figure out what is so special about the GUID generated by VS.NET.

Please help!
Juan Dent
Signature

Thanks in advance,

Juan Dent, M.Sc.

Mattias Sj?gren - 07 Jan 2005 18:40 GMT
Juan,

>It seems to me that the GUID needs to be generated by the solution.
>But, there should be a way to force it to accept a GUID provided by me or to
>somehow figure out what is so special about the GUID generated by VS.NET.

That GUID is used to identify the project as a C# project, so you
shouldn't change it.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Juan Dent - 07 Jan 2005 20:14 GMT
Hi,

Ok, so is there a way (similar to a VBA macro) in which I can add the
project to the solution via some kind of script?

Thanks,
Juan Dent

"Mattias Sjögren" wrote:

> Juan,
>
[quoted text clipped - 6 lines]
>
> Mattias

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.