When I develop a web application via Visual Studio 2013 (version 12.0.21005) and compile/build and run locally (Citrix Desktop) it works fine. However, when the same project is built in our BUILD server it fails with the following error.
"error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found."
Looking at the build server (under C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio folder) I can find that there are v10.0 and v14.0 installed.
What instructs the system to look for v11.0 when other versions are avaiable on the server. is there some setting on the csproj or the solution file (as my WindowsForms based projects compile fine in the BUILD server)
Unfortunately I do not have the rights to install MSBUID in either the Citrix Desktop or the Build Server
Logged into the servers to find the available build versions
Found the answer in the following post.
https://devblogs.microsoft.com/aspnet/visual-studio-project-compatibility-and-visualstudioversion/
Als refer to https://en.wikipedia.org/wiki/MSBuild for version history
Related
This is my current MVC Project setup for a project named ABC.sln
Project ABC.sln with following projects
A.csproj, B.csproj, C.csproj
I am trying to publish A.csproj to IIS via VSTS Visual studio build (version 2019)
Here is my msbuild arguments:
/p:SolutionDir="$(Build.SourcesDirectory)" /p:DeployOnBuild=True /p:Configuration=$(BuildConfiguration) /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=serverpath.com /p:DeployIISAppPath=mysite.com /p:OutputPath=$(Build.BinariesDirectory) /p:AllowUntrustedCertificate=true /p:UserName= /p:AuthType=NTLM /p:DeleteExistingFiles=True /p:SkipExtraFilesOnServer=False
Solution:
$(Build.SourcesDirectory)/A/A.csproj
Platform: AnyCPU
Build runs successfully, and I do get the:
Successfully executed Web deployment task.
Package "A.zip" is successfully created as single file at the following location:
file:///C:/agent/_work/54/b/_PublishedWebsites/A_Package
To get the instructions on how to deploy the web package please visit the following link:
https://go.microsoft.com/fwlink/?LinkId=124618
GenerateSampleDeployScript:
Sample script for deploying this package is generated at the following location:
C:\agent\_work\54\b\_PublishedWebsites\A.deploy.cmd
For this sample script, you can change the deploy parameters by changing the following file:
C:\agent\_work\54\b\_PublishedWebsites\A.SetParameters.xml
PipelineDeployPhase:
Publish Pipeline Deploy Phase
Done Building Project "C:\agent\_work\54\s\A.csproj" (default targets).
However, I do not see where it was published. I do not see any of the files published in any folder on my IIS server for this app pool.
Why does it say package? Shouldn't the files from A.csproj be directly published to the mentioned p:DeployIISAppPath?
Why does it say package? Shouldn't the files from A.csproj be directly
published to the mentioned p:DeployIISAppPath?
One of the workaround you can follow,
To check if the .csproj file exist or not please check the scm site whether its available or not under D:/home/site/wwwroot . And make sure that deployed file structure is same as on Azure and IIS. Please find the reference image to check the scm site.
For complete setup to deploy ASP.Net MVC app to IIS on Windows please refer this BLOG by#Asma Khalid .
For more information please refer the below links for the similar issues:-
SO THREAD| How to deploy the entire project to IIS ,
Automatically publish web application on build from Visual Studio ,
How to deploy an ASP.NET MVC application on build using MSBuild in Visual Studio .
I am using Visual Studio Community 2017 and want to include TeamViewer.exe or any other .exe file in project setup file as prerequisite.
When installing my setup file,it should check whether TeamViewer is installed on client machine or not.
if TeamViewer is not installed on client machine,then it should automatically install with my setup.
I have used TFS API to develop a custom Web Application.
When I try to build the Application on the server using TFS Build, I see the
build failing since there are no assemblies installed on the
Build Server.
I have searched online but couldnt find any. Is there an msi somewhere
that I can install on the TFS Build Server which installs all the TFS
API assemblies on the build server ?? , instead of installing
each and every assembly individually.
Most teams install Visual Studio on the build server for a number of reasons. If you do that it will include the TFS Object Model assemblies.
Its an Asp.net website . Running good on local development system . VS2010 and .NET 4 . When uploading to web server it throws an assembly could not be loaded error in my web.config file .
I sort it on google by changing framework from 3.5 to 4 will arise this error . My doubt is there any way to lock or persist the integrity of an assembly file through out the .NET versions .
My hosting server URL : http://ananth7453-001-site1.mywindowshosting.com/
Thanks for your time
VSLangProj80 is installed as part of Visual Studio which is why your site works on your development machine. Copy the DLL to your project folder and then replace the reference in Visual Studio with the copy.
On my machine VSLangProj80 is located at C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\VSLangProj80.dll
I want to share the solution I encountered as I have the same issue encountered. Over the years, our web server is installed with different Visual Studio programs, such as Shell (integrated mode) and Tools for Applications 2.0 ENU. There's also Tools for Office Runtime. It took us a while to isolate which of these installs conflicts to the application we are trying to install.
We found out that our application has the latest version of VSLangProj80.dll and the one in our server is using older version. Without changing our build since it is working on our UAT environment, we manage to un-install the Tools for Application 2.0 ENU. Removing this one out of our production server resolved this issue.
I'm trying to deploy a WinForm app through clickonce using a ftp site on my dreamhost account. However, when I try to publish, I get the following error:
Failed to connect to 'ftp://ftp.mydomain.com/client' with the following error: Unable to create the Web site 'ftp://ftp.mydomain.com/client'. The components for communicating with FrontPage Server Extensions are not installed.
Here is my settings on the publish tab
Publishing Folder Location: ftp://ftp.mydomain.com/client
Installation Folder URL: http://ftp.mydomain.com/client
It seems that Visual Studio is not realizing I am publishing to a ftp site and not a site with FrontPage.
Does anyone know how to fix this problem?
Visual Studio only supports publishing to web servers that have Frontpage Extensions installed, regardless of whether connecting via FTP or HTTP. If your host doesn't support them, you will have to publish to a local folder and then upload its contents using an FTP client.
UPDATE: The FrontPage extension components need to be installed on the machine you are DEVELOPING on (Used to publish). The server shouldn't matter--it's simply FTP. On your development system, go to control panel > add/remove programs > and repair "Microsoft Visual Studio Web Authoring Component". Depending on the version you have, you may need to repair VS2010, etc. This will reinstall the FP components on YOUR machine, allowing you to publish via FTP.
Do you recently installed Xamarin extensions xamarin.visualstudioInstall.msi ?
This is cause of stopped deployment component.
Check this discusion:
http://forums.xamarin.com/discussion/30406/bug-after-installing-xamarin
Removing 'Xamarin' from the uninstall/change a program fixed the issue for me.
After that VS 2013 and VS 2015 RC1 deployments started to work again.
what is worth of acknowledgment is the fact that Visual Studio 2010 may report such error due to problems with lacking RAM or after several sleep or hibernation phases with VS turned on. I experienced this with a perfectly well configured server which I have used for ages and done hundreds of publishes, the error came all of a sudden and the only medicine was a VS restart (or sometimes the whole machine's restart). Best regards.
According to MSDN specs, you'll have to add some custom content/mime types to your server for ClickOnce:
If you are deploying a ClickOnce application from a Web server
other than IIS, you may experience a problem if the server is
returning the incorrect content type for key ClickOnce files, such as
the deployment manifest and application manifest. To resolve this
problem, see your Web server's Help documentation about how to add new
content types to the server, and make sure that all the file name
extension mappings listed in the following table are in place.
File name extension Content type
=================== ===========================
.application application/x-ms-application
.manifest application/x-ms-manifest
.deploy application/octet-stream
.msu application/octet-stream
.msp application/octet-stream
DreamHost allows you to add custom mime types in a .htaccess file.