Failing in file upload vsts2010 performance testing - visual-studio-2010

I have created a webtest using VSTS 2010. There is a scenario where the webtest uploads the file in a form.
But when i run the webtest it gives an error message:
Request failed: Could not find file
'C:\Users\documents\visual studio
2010\Projects\TestResults\TESTING 2013-01-07
08_15_05\Out\html.html'.
I am using trial version of Visual Studio 2010 ultimate.
I have searched on Google regarding this issue. It was mentioned in a website to use file upload-plugin. My question is does this plugin works with trial version of Visual Studio 2010? If yes then please provide me the concerned list, it will be helpful for me.

Add the file as a deployment item
Local Setting > Deployment > enable deployment > Add File

I tried same steps
Local Setting > Deployment > enable deployment > Add File
Still getting same issue, only thing i am running application in remote execution mode and can see error in one of Agent machine, although other dll and plugins are getting copied on path only PDF files i added in deployment are not copied.
Is any other setting I am missing here?

You have to add that required file as deployment item so that automatically it will take file and you issue will resolve.

Related

Team Foundation Server build failure

I have following tools installed on my machine:
TFS 2017
Visual Studio 2017
MSBuild 14.0
In my application, I'm using some C#6 elements like string interpolation ($).
When I try to build it, controller says that it could not resolve the symbol.
Builds fail for both XAML and standard definitions.
In build logs, there's an information that it uses correct MSBuild 14.0 path: C:\Program Files (x86)\MSBuild\14.0\bin, but still failes to resolve C#6 elements.
I would really appreciate if you would help me with this problem, I've searched entire internet and found nothing :/
If you guys need any information, I'll be more than happy to provide it. Thank you.
TFS with XAML build is just using MSBuild to run the build. You could first try to use MSBuild command to run the build test locally, which will narrow down the issue.
If it works well on your dev machine and not works from a TFS server build. Very likely the environment problem.
To make sure the build successful, you should keep your build server environment the same with your local environment. Please double check this.
For trouble shooting, you could try to remote to your build agent, manually run your build and test on your build agent.
As for how to enable C#6, you could also refer this similar question, modify TFSBuildServiceHost.exe.config file which may do the trick. How do I enable C# 7 builds in Team Foundation Server 2015?
If you still get error, please include detail build failed logs here.

VS2017 RC - The following error occurred when trying to configure IIS Express

Installed VS2017 RC - Started New Project ASP.NET Core Web Aplication(.Net CORE), selected Individual User Accounts as Authentication type. Try to run code generated with no changes and got the following error: Error occurred when trying to configure IIS Express for project... Error: ../.vs/config/applicationhost.config Error: cannot write configuration file
Looked at that file and it appears that it should have been writable.
FYI using VS2015 Update 3 everything builds and runs as expected including IIS Express.
I have encountered the same issue but deleting .vs folder worked for me.
I was having this issue, but only after the recent updated to Visual Studio 2017 RC (12/12/16).
I searched for a good hour and really didn't find anything, so I simply downloaded the latest IIS Express (v10) and it seems to have corrected the issues for 2017, but also for 2015 that started after the update as well.
IIS Express Download
EFS (Encryption File System) is known to cause file access problems. Ensure that EFS is turned off in your project directory.
More information:
https://blog.danielsmon.com/2017/04/03/cant-write-to-applicationhost-config/

Visual Studio 2015 ftp publish method doesn't always update changed files on publish

We have been using the ftp publishing method to upload our site to an external server. But have recently discovered that some of the JavaScript files that have been changed are not being updated when published. We have checked on the server to verify if the files have been uploaded and only found the old versions, so it's not a cache issue.
Additional Information:
We are using Visual Studio Team Services
We are using ASP.NET MVC.
We have the 'Exclude files from the App_Data folder' File Publish
Option checked.
We are not sure what is causing this to happen but suspect that the issue might be caused by source control. That the files that have been worked on and checked in on one machine are not seen as having been changed by the Visual Studio on the machine doing the publication.
We've found this question Content files not updating with Visual Studio 2010 FTP Publish that seems to relate to the issue we're having but would prefer not to have to use the workarounds provided.
Is there a other way to fix or avoid this issue?
I've been experiencing this off-and-on with file system publishing. Out of pure desperation I created a new publish profile and...it worked.
It appears to be related an issue with the .user file that's created for the publish profile. While not a solution, a workaround at least can be to remove the .user file if a problem is encountered.
Related question: Visual Studio 2012 Web Publish doesn't copy files

Publish website without roslyn

I am trying to create web application using Visual Studio 2015 and .NET 4.5.1.
When I publish the website, visual studio create folder named roslyn.
I know it's used to compile code on the fly, but unfortunately my hosting provider doesn't allow me to execute the compiler on their server.
How to publish the website without roslyn like previous version of Visual Studio?
EDIT:
I got this error when trying to acces my website.
It seems IIS trying to execute roslyn\csc.exe but my user account doesn't have permission to do that. With previous version of Visual Studio, this error doesn't show up.
I've just faced the same problem. When you create a new web project, two nuget packages automatically added to your project. If you remove them, your problem should be solved. Package names are: "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" and "Microsoft.Net.Compilers".
I had the same issue. Followed the steps from here. Basically:
Uninstall the package
Uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform <Your Web API project name>
In your publish profile settings, uncheck "Allow precompiled site to be updatable". You can find this under Settings > Precompile during publishing > configure
After searching the same issued I face, I just came here. I read the above answer which is right.
I give the answer, because of Here is the good article to explain :
Why the publish code have this exe as well as development environment ?
What is the benefit and how to remove?
This is also the very good article, about the history of this exe
After countless effort....and according to this website.
I find that you can use /p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false in MSBuild to transform web.config, this also include the roslyn compiler in the build. The output is same as what you get by publishing in Visual Studio into file system
There is an open bug on the roslyn repository about this issue.
In my case all I had to do was to downgrade the dll Microsoft.CodeDom.Providers.DotNetCompilerPlatform from version 1.0.6 to 1.0.5.
I have had the same issue in Sept2016 when I took over an existing ASP.NET program. I found that there were multiple versions of the two compiler packages mentioned by Kemal installed in different projects of the solution.
So firstly I updated to get them the same. VS doesn't tell you that updates are available in this scenario (or maybe I missed them ?)
I then had to restart VS2015 for the packages to clean up properly.

MS Deploy task failed DeploymentBaseOptions does not contain a definition for UserAgent

I am having trouble running a Team Foundation 2013 build with MS Build parameters for deployment and I am getting an error :
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (4255): Web deployment task failed. ('Microsoft.Web.Deployment.DeploymentBaseOptions' does not contain a definition for 'UserAgent')
Development is being done in VS 2013.
What is strange is that if I copy the MSBuild folder *..\v11.0\Web* to the *v12.0\Web*
The build works and does the deployment.
I have already checked the v12.0\Web\Microsoft.Web.Publishing.targets file and there is an entry for UserAgent while in the v11.0\Web\Microsoft.Web.Publishing.targets there is no entry
I am able to publish fine using VS Publish on my computer , but on the build server it fails
Has anyone managed to build and deploy using MSBuild VS 2013 targets successfully?
I faced the same issue. For me the solution was to install Web Deploy 3.5 (http://www.iis.net/downloads/microsoft/web-deploy). After that the error disappeared.
I am posting this in Oct 2019. Almost 6 years after the original post on this thread, the error still occurs, but this time on VS 2019. After looking around the web and being unable to fix it even after reinstalling Deploy 3.5/3.6 and also after updating VS, I finally managed to fix it by poking around MSBuild settings. Wanted to share it here, as this is the top search result on Google.
Steps:
Created a simple command prompt application on VS 2019. Right-clicked on the project in Solution Explorer, clicked on "Publish as Azure Webjob...", and made my Azure settings in the ensuing dialog.
Expected Result:
This simple console app would be published to Azure as a WebJob, as it always did on VS 2017.
Actual Result:
The publish operation failed with the following message:
Error : Web deployment task failed. ('Microsoft.Web.Deployment.DeploymentBaseOptions' does not contain a definition for 'UserAgent') Publish failed to deploy.
Investigation:
The error line in the Output pane in Visual Studio was pointing to the file Microsoft.Web.Publishing.targets under "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\Web". Double-clicking on this error line opened up the file at a location showing the section <VSMSDeploy>. In this section, the UserAgent property was set to "$(_MSDeployUserAgent)". _MSDeployUserAgent was in turn set up under <PropertyGroup> as <_MSDeployUserAgent>VS$(_MSDeployUserAgentSource)</_MSDeployUserAgent>. The entire PropertyGroup section is pasted below for reference:
<!-- UserAgent string sent to msdeploy -->
<PropertyGroup>
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' != 'true'">$(VisualStudioVersion):CmdLine</_MSDeployUserAgentSource>
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' == 'true'">$(VisualStudioVersion):PublishDialog</_MSDeployUserAgentSource>
<_MSDeployUserAgent>VS$(_MSDeployUserAgentSource)</_MSDeployUserAgent>
</PropertyGroup>
The Fix:
Changing UserAgent= "$(_MSDeployUserAgent)" in the <VSMSDeploy> element
to UserAgent="VS$(_MSDeployUserAgentSource)" fixed the issue, and the WebJob was successfully published to my App Service.
(WARNING: Please exercise the greatest caution when modifying this file, as an incorrect change will adversely impact ALL build commands from within VS and from the command prompt.)
Concluding Observation:
After making this change to Microsoft.Web.Publishing.targets, VS seems to have proceeded with UserAgent settings akin to a CommandLine build, without distinguishing it from a PublicDialog build. All Publish-related output lines were shown in the Output pane as they used to in VS 2017, and everything went well.

Resources