|
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
-
|