Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Registery value of the MSBuild.exe
 

Registery value of the MSBuild.exe

Hi Friends

I have done a tool which will automate the build process using winforms in c#.

Earlier the tool used to work fine, i will take the latest version from the VSS and with the help of batch file i am able to build the project. (during this time i had only framework 2.0)

After installing .net 3.5 framework does this Registery value will get change, as in line 6 i am getting the registery value of MSBuild.exe file. If i run the application it will tell object reference not set to the instance of an object, i don't know.

What is my doubt is IS the registery or the Key or Value of MsBuild.exe will change when we install the latest .Net framework

here is the sample code:


xmldoc.Load(strXMLFilePath);
XmlNode x = xmldoc.SelectSingleNode("//vss");
localpath = x.Attributes["localpath"].Value;
string strFile = DirSearch(localpath + @"\\");
strFile = strFile.Remove(0, strFile.LastIndexOf("\\"));

strExecutionPath = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\D3CD060B1EE638D4ABA554426FA0CD36", "D6461317C3DC4F04799BDCE9E42626FE", null).ToString();

strExecutionPath = strExecutionPath.Replace("?", ":");
strExecutionPath = strExecutionPath.Remove(strExecutionPath.Length - 12);
strNetDriveName = strExecutionPath.Substring(0, 2);
System.IO.StreamWriter sr = new System.IO.StreamWriter(strNetDriveName + @"\batch.bat");
sr.WriteLine("cd\\");
sr.WriteLine(strNetDriveName);
sr.WriteLine(@"cd " + strExecutionPath);
sr.WriteLine("MSBuild " + localpath + "\\" + strFile + " >" + strNetDriveName + @"\buildOutput.txt");
sr.Close();
RunBuild(strNetDriveName + @"\batch.bat");
this.Refresh();
lblBuildSucceed.Text = "Build process completed. ";




Chetan
  • Changed TypeSteven.Yu Monday, December 29, 2008 1:46 AM
  • Changed TypeSteven.Yu Monday, December 29, 2008 1:46 AM
  •  
Chetan VD  Monday, December 22, 2008 11:48 AM
Hi Chetan VD,

I have read your thread carefully, but I am not sure whether the change of your Registery value is caused by different version of .net framework.
If it is, I suggest thatjudge the version of .net framework before you get the value.
And then get it at different position according to different version.

If there's any problem, please feel free to let me know.

Best regards,
Steven Yu
Steven.Yu  Tuesday, December 23, 2008 9:51 AM

Hi Chetan VD,

We are changing the issue type to “Comment�because we are not sure whether your problem has been solved. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by clicking options, choosing Change Type and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Thank you!

Best Regards

Stevem Yu

Steven.Yu  Monday, December 29, 2008 1:47 AM

You can use google to search for other answers

Custom Search

More Threads

• why seprate block for instrumentation in enterprise library 4.0 or later
• Xpander controls license
• Terrarium Setup Help
• A working Terrarium with v1.1 framework?
• uninstall msi application
• I'm new
• Error 1920 Verify that you have sufficient privilege to start system services while installing a web application.
• Installer is no longer responding
• naka invasion
• Terrarium can't connect to server