Building VS 2003 Solution Using Devenv.com on Build Server With Windows Server 2008 R2 - windows-server-2008-r2

I am trying to build .NET Framework 1.1 solution (VS 2003) on a TFS build server 2008 which is on windows server 2008 R2 machine. I am following the instructions from this website
http://blogs.msdn.com/b/nagarajp/archive/2005/10/26/485368.aspx
and going for the second solution suggested. The build server goes through the first 4 steps fine (Initializing build, Getting Sources, Labelling Sources and Compiling Sources for any cpu/release) but after then it just shows that Build in progress and does not do anything. I left the job running overnight and it still shows Buiid In progress. I checked the event log and it displays the following message:
The application (Visual Studio .NET 2003, from vendor Microsoft) has the following problem: Visual Studio .NET 2003 has a known compatibility issue with this version of Windows.
When i log in to the build server and then try opening Visual Studio 2003, it shows me a pop up window with the same message and then i have to click Run Program to go further. But since i am building the solution using command line, i am wondering how can i do that? I have also tried to run this program in compatibility mode (windows xp service pack 3) and checked the options "Disabe visual themes" and "Disable desktop composition" but no luck. Can anyone please help?

This is the modified version of the configuration file for 1.1 Framework project to get build with Build Server 2008 on Windows Server 2008 R2:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<ProjectExtensions>
<ProjectFileVersion>2</ProjectFileVersion>
<Description></Description>
<BuildMachine>UNKNOWN</BuildMachine>
</ProjectExtensions>
<PropertyGroup>
<TeamProject>1.1 Framework</TeamProject>
<BuildDirectoryPath>UNKNOWN</BuildDirectoryPath>
<DropLocation>\\UNKNOWN\drops</DropLocation>
<RunTest>false</RunTest>
<RunCodeAnalysis>Never</RunCodeAnalysis>
<WorkItemType>Bug</WorkItemType>
<WorkItemFieldValues>System.Reason=Build Failure;System.Description=Start the build using Team Build</WorkItemFieldValues>
<WorkItemTitle>Build failure in build:</WorkItemTitle>
<DescriptionText>This work item was created by Team Build on a build failure. </DescriptionText>
<BuildlogText>The build log file is at:</BuildlogText>
<ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>
<UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>
<AdditionalVCOverrides></AdditionalVCOverrides>
<CustomPropertiesForClean></CustomPropertiesForClean>
<CustomPropertiesForBuild></CustomPropertiesForBuild>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<ConfigurationToBuild Include="Release|Any CPU">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<PropertyGroup>
<VS2003_Devenv>C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com</VS2003_Devenv>
<VS2003_Configuration>Release</VS2003_Configuration>
</PropertyGroup>
<ItemGroup>
<VS2003_OutputFiles Include="$(SolutionRoot)\DSC.STARS\Main\DSC.STARS.Web\**\*.*" />
</ItemGroup>
<Target Name="AfterCompile">
<Exec Command=""$(VS2003_Devenv)" "$(SolutionRoot)\DSC.STARS\Main\DSC.STARS.SOLUTION.sln" /build release" />
<MakeDir Directories="$(BinariesRoot)\$(VS2003_Configuration)" Condition="!Exists('$(BinariesRoot)\$(VS2003_Configuration)')" />
<Copy SourceFiles="#(VS2003_OutputFiles)" DestinationFiles="#(VS2003_OutputFiles- >'$(BinariesRoot)\$(VS2003_Configuration)\%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>
</Project>

Related

Failed to Start Process with Commandline VSIISExeLauncher.exe in IIS 10.0

Thursday night, I was working on a project built in ASP.NET Core 2.1 (being prepared for ASP.NET Core 2.2) running on my local IIS 10.0 (not IIS Express) and was able to run it without any issue. Friday morning, after heading into the office, I was met with the following error every time I try to run my solution in Visual Studio:
Unable to start process C:\Program Files (x86)\dotnet\dotnet.exe. The web server request failed with status code 502, Bad Gateway. The full response has been written to [file_name].html.
When I open the [file_name].html, I'm given the response:
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
When I open the Event Viewer, I'm given the response:
Application 'MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE/[Path]' with physical root '[Path]' failed to start process with commandline '[Path]\bin\IISSupport\VSIISExeLauncher.exe -argFile IISExeLauncherArgs.txt', ErrorCode = '0x800700c1' : 0.
I have:
Turned off and on the IIS through Windows Features, making sure the correct Internet Information Services features were checked
Created an Application Pool where [.NET CLR version] is set to "No Managed Code" and [Managed pipeline mode] is set to "Integrated"
Uninstalled and Reinstalled: IIS Url Rewrite to IIS
Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.1.504 (x64)
Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.1.504 (x84)
Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.2.104 (x64)
Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.2.104 (x84)
Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.1.8 (x64)
Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.1.8 (x86)
Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.2.2 (x64)
Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.2.2 (x86)
Uninstalled and Reinstalled: Microsoft .NET Core 2.1.8 - Windows Server Hosting
Uninstalled and Reinstalled: Microsoft .NET Core 2.2.2 - Windows Server Hosting
Restarted my computer after ever re-installation
What else can I try because none of my other projects are working either.
In my case this issue occurred when I manually cleared the bin folder (which deleted the necessary files in the IISSupport folder) and tried to load the application which was set up as an application under my localhost in IIS.
To solve all I needed to do was to run the application through Visual Studio, which added the necessary IISSupport folder and files to the bin.
I got this fixed by re-installing the Visual studio. Still I'm not sure if this is the best way to fix this.
I've also tried all the approaches mentioned in this question but nothing fixed the issue.
I found the solution.
In the root folder of my team's project, there was an empty "file" file titled "The". For the sake of things, our project is called "The Project" with a space between the words. I removed this file and everything built fine.
My guess is that getting the latest files from our Teams server must have generated a half-formed file and messed with the build of my project.
In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.
I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.
After that I was able to access the local website that was setup in IIS without running it in Visual Studio.
In my case, the issue is in launchSettings.json.
First, make sure which profile you are running while click run button.
my case is 'IIS Express',
Then open the file, go to =>Profiles, make sure the command name in IIS Express profile.
my case is IIS. more details about command name.
And check iisSettings in above section.
my case is using IIS as command, so I check iis => applictionUrl and sslPort.
the issue is here, the application url is using a different domain name.
which is different from the launch URL. once i republish the website on my local dev box using the launch url domain, it works fine. BTW, we use host file to fake those domain names.
if you have other team members working on the same project, make sure you all use same settings of the dev web site. or developers can just edit it locally, do not check in the settings if it could not work on other developer's machine.
in my case i solved the error deleting the .vs folder on the project root and i restarted visual studio.
I had an issue with failed to start process with commandline on the remote IIS. I had to add the web.config to the project and ensure it would be published. The default file looks like below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- To customize the asp.net core module uncomment and edit the following section. For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
<system.webServer>
<handlers>
<remove name="aspNetCore" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</configuration>
I replaced %LAUNCHER_PATH% with dotnet and %LAUNCHER_ARGS% with .\MyProjectNameHere.dll like
<aspNetCore processPath="dotnet" arguments=".\Web.Api.V3.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">

Visual Studio Code can't load projects - Microsoft.NET.Sdk.Web could not be found

I have a project folder in Visual Studio Code on Debian 9 with a Solution file that references two projects. When opening the folder, a banner appears saying "Some projects have trouble loading. Please review the output for more details". Viewing the output shows the following exception for the main WebAPI project:
[warn]: OmniSharp.MSBuild.MSBuildProjectSystem
Failed to load project file '/home/aidan/Projects/WebApiDemo/WebApiDemo/WebApiDemo.csproj'.
/home/aidan/Projects/WebApiDemo/WebApiDemo/WebApiDemo.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
The unit test project returns a similar The SDK 'Microsoft.NET.Sdk' specified could not be found.
All other answers to this type of question refer to a global.json file, which I don't have anywhere in my project - this was a new .NET Core 2 project, and not converted from an older version. Adding global.json does nothing. It was working at first, and I'm not sure what I changed to make it break. I do have the dotnet folder in my $PATH. The project file looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
</Project>
Since I don't see any other explicit references to the SDK or its location in my project I'm stuck - any ideas what caused this to break?
Try to set MSBuildSDKsPath
export MSBuildSDKsPath=/opt/dotnet/sdk/2.2.105/Sdks

Reboot not required for .NET 4.0 after VS2012 runtime installation

My WPF application was running fine when built on VS2010 and using WiX3.5. I changed to VS2012 and installed the VS2012 runtime using Wix as below:
<DirectoryRef Id="TARGETDIR">
<Merge Id="VC110RedistCRT" SourceFile="C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VC110RedistMFC" SourceFile="C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC110_MFC_x86.msm" DiskId="1" Language="0"/>
</DirectoryRef>
<Feature Id="VC110Redist" Title="Visual C++ 11.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VC110RedistCRT"/>
<MergeRef Id="VC110RedistMFC"/>
</Feature>
Earlier with VS2010, application installation on new machine used to ask for reboot while installing .NET framework. Now with VS2012, it doesn't ask for reboot and application is running fine also.
I just wanted to know the possible reason and any side effects of this. Any details of how the C++ runtime and .Net Framework installation work with each other will be helpful.
Thanks

Why won't my Visual Studio 2012 publish correctly using msbuild?

We use Jenkins and msbuild to compile and package our software.
We've upgraded to Visual Studio 2012, which greatly improves the command line publishing functionality.
According to this: How do I configure MSBuild to use a saved publishProfile for WebDeploy?
I should be able to create the profile (I have, it working in VS2012 and deploys to C:\Built\PojectName) and in the jenkins job fire it off with:
msbuild myproj.csproj /p:DeployOnBuild=true;PublishProfile=Jenkins$Configuration.pubxml
Where $Configuration is Debug.
The build runs and finishes with "SUCCESS".
However, there is no Built folder created, there is a .zip file inside obj\debug
This is not what it's configured to do:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:\Built\blahblah</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>True</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
</Project>
Further to that, if I deliberately munge the profile name to, say, NoSuchFile.pubxml, it still completes with success.
On the server we have Jenkins, .net 4.5, a recent Windows SDK and MS Web Deploy 2.0 installed.
Why is msbuild not picking up my publish profile?

Error doing web.config transformation for different environments

I was trying to deploy my app into different environments then i started following this how to:
Deploying an ASP.NET Web Application to a Hosting Provider using Visual Studio or Visual Web Developer: Web.Config File Transformations - 3 of 12
was perfect until I clicked in Preview Transform, I received this error:
Microsoft Visual Studio
Could not load file or assembly 'Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
(I created just one transformation Web.DebugQA.config and of course the default ones, debug and release)
my Web.DebugQA.config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
<system.web>
</system.web>
<appSettings>
<add key="EnvironmentName" value="QADev" xdt:Transform="SetAttributes(value)"
xdt:Locator="Match(key)" />
</appSettings>
</configuration>
but then I install this plugin:
SlowCheetah - XML Transforms
and I solved my preview transform error, but then when I was trying to publish using the QADev transform I got this error:
The "ImportParametersFile" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Web.Publishing.Tasks.ImportParametersFile.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I'm using Visual Studio Pro 2012.
I fixed this by repairing "Microsoft ASP.NET and Web Tools 2013.1 - Visual Studio 2012" from Control Panel --> Programs and Features.
The file Microsoft.Web.XmlTransform.dll was missing from the path C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web.
I had a similar error, although it was caused for different reasons.
I solved it copying the following DLL from another PC with VS2012 installed:
Microsoft.Web.XmlTransforms.dll
from: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
I hope this helps
I had same problem in VS2012, could not 'Preview Transform' for the PublishPackage tranforms e.g. Web.Staging.config complaining about Microsoft.Web.XmlTransform
I got it working by adding the Package https://nuget.org/packages/Microsoft.Web.Xdt to my Mvc 4.5 project. This package is still in pre release.
PM> Install-Package Microsoft.Web.Xdt -Pre
This package contains the Microsoft.Web.XmlTransform.dll
I still get an error during building complaining about "Could not load file or assembly Microsoft.Web.XmlTransform". The Mvc project has still built ok.
I did try adding the Microsoft.Web.XmlTransform.dll to the Gac using the gacutil but that did not fix the problem.
However I use Team Foundation Service build server and it works and creates the correct Web.config after applying the Web.Release.config and then the Web.Staging.config.
I tried below two things but it did not work for me.
1) copying the Microsoft.Web.XmlTransforms.dll DLL to location C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
2) And repairing "Microsoft ASP.NET and Web Tools 2013.1 - Visual Studio 2012"
Then I uninstalled Microsoft Azure tool V2.6 from control panel -> Programs and Features. And then I can able to publish my site.
This may have been fixed in Visual Studio 2012 Update 2 (and Visual Studio 2013).
Web.config "Preview Transform" gives an error
...
Posted by Microsoft on 3/1/2013 at 2:46 PM
Thanks for reporting the issue! It will be fixed in Visual Studio 2012 Update 2. Please install it when it becomes available.

Resources