publish project in vs2013 - visual-studio-2013

I have a project that builds and is publish correctly before I moved to Windows 10. After I updated to Windows 10 I can build and test my project but I cannot publish my MVC project. It gives me the following error which I do not understand:
Could not load file or assembly 'Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I added Microsoft.Web.Deployment from nuget but I still get the same error.

Following will solve your problem
Downloaded Web Deploy 3.5, from http://www.iis.net/downloads/microsoft/web-deploy
install complete package
Then open your project in VS 2013.
Publish your project.
Thanks

Related

TFS2015 Visual Studio Test: Could not load file or assembly

I have an "old" XAML Build Definition, made in Visual Studio; which builds a solution and following runs unit tests.
Now I've tried to make the same in the new TFS 2015 web surface.
I've created a build task, following Visual Studio Test.
But now the Test-Task exit with code 1 and gives me a lot of
"System.IO.FileNotFoundException: Could not load file or assembly" errors.
And also "Warning: MSTestAdapter failed to discover tests in class ..."
All the DLLs are where they have to be, the new definition has the same directory structure like the old one, but the test-task says there are missing assemblys.
Any ideas?
Update:
No, I still have the same error messages:
Warning: Unable to load types from the test source 'J:\xyz-Tests.dll'. Some or all of the tests in this source may not be discovered. If you are running unit tests for Windows Store apps and referencing custom WinMD type then please visit http://go.microsoft.com/fwlink/?LinkId=238340 for more info. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'xyz_Commons, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'xyz_Processing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'xyzCommons, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
This should exactly be the issue mentioned in below article, please try following the workaround to fix it:
Running Coded UI Tests built using Visual Studio 2013 with Team Foundation Server 2015
Test execution is failing in this scenario because test execution
engine is not able to resolve the old version binaries while executing
tests in a 14.0 environment (TFS 2015).
So, you need to update the projects to reference the new versions of the assemblies (VS 2015 in this scenario) using the assembly bindings in the test projects config file.
As a workaround to this issue, add an ‘app.config’ file to your
solution (See how to add app.config
https://msdn.microsoft.com/en-in/library/ms184658.aspx) and update the
contents of the file with the shared on OneDrive . The updated
configuration files contain assembly redirects from version 12.0 to
14.0, which will make sure that the test agent machine is able to resolve the framework assemblies. Check-in the updated configuration
file into the source control repository and run the BDT scenario once
again. The tests should run fine this time. If the test execution
again throws an error complaining version mismatch for some other
assembly, add the assembly to the app.config file and retry.
You can also reference this article :
http://www.dotnetcatch.com/2015/10/01/tfs-2010-to-2015-upgrade-codedui-feature-test-builds/

Getting dnu build working on TeamCity

We're trying to get a vNext project building on TeamCity 9.16 - the project is using the dnx451 and dnxcore50 frameworks.
When TeamCity is running dnu build for DNX,Version=v4.5.1 it's erroring when trying to build System.Configuration 4.0.0 with the following error:
DNX,Version=v4.5.1 error CS0012: The type 'Action<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes
However running dnu build from the command line when logged on to the machine as the TeamCity build agent is successful (after running dnvm upgrade)
I suspect that this might be something to do with TeamCity and Paths but am at a loss as how to proceed.

a new build error after making change by replacing version=10.0.0.0 with 11.0.0.0 in VS2010

I got the same problem as Build Error + Creating VSTO addin for excel 2010
After making the change according to the solution, I got the new error:
The "InitializeDefaultProperties" task could not be loaded from the
assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or
assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified. Confirm
that the <UsingTask> declaration is correct, that the assembly and all its
dependencies are available, and that the task contains a public class that
implements Microsoft.Build.Framework.ITask.
I have installed VS2013 on the same machine so I change version=12.0.0.0 but I got a new error:
Error 2 The "SetInclusionListEntry" task could not be instantiated from
the assembly "Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Please verify the task assembly has been built using the same version of
the Microsoft.Build.Framework assembly as the one installed on your
computer and that your host application is not missing a binding redirect
for Microsoft.Build.Framework. Unable to cast object of type Micro
soft.VisualStudio.Tools.Office.BuildTasks.SetInclusionListEntry' to type
'Microsoft.Build.Framework.ITask'.
I know it's an old post, but maybe I have a solution for you...
I ran into exactly the same problem and I have to tell you that the "InitializeDefaultProperties" exception is not fix-able for VS2010.
First of all:
Make sure that your Visual Studio 2010 installation is not modified, anyway make a clean install just to be sure.
If you modified the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets revert your changes.
If you now try to build your VSTO Project the following error should apppear:
The "FindRibbons" task could not be loaded from the assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file
or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the
assembly and all its dependencies are available, and that the task
contains a public class that implements
Microsoft.Build.Framework.ITask.
My Solution:
--> Open Visual Studio 2010 (you dont need to load a Project)
--> Go to Help an click About Microsoft Visual Studio
--> Check Version
Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel Microsoft
.NET Framework Version 4.5.51209 SP1Rel
If it says RTMRel download the Microsoft Visual Studio 2010 SP1 from here: http://go.microsoft.com/fwlink/?LinkId=210710
It includes the necessary VSTO and VSTO 4.0 Runtime.
If thats not the Problem, I'm sorry...
As I encountered the same problem upgrading our build server... I am gonna put the solution here in case anyone needs it.
I think the way to solve this is to fix your GAC.
Open the .target file of that tool by notepad and take a look at the UsingTask tag, you should get something like
<UsingTask TaskName="InitializeDefaultProperties" AssemblyName=" Microsoft.VisualStudio.Tools.Office.BuildTasks", Version=11.0.0.0,..., PublicKeyToken=sthsthsth
Then, go to your GAC files, e.g. C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.BuildTasks
Then, create a new folder: v4.0_11.0.0.0_sthsthsth,
which is:
v<.NETFramework Version, mostly 4.0>_<Assembly Version>_<PublicKeyToken>
And then, put the .dll file of Microsoft.VisualStudio.Tools.Office.BuildTasks in it.
This dll should be obtained when you install VSTO either by directly install (VSTO2010) or by Visual Studio installer
e.g.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.BuildTasks.dll
for Visual Studio 2017 and then directly place the dll inside the folder created
Then this issue should be fixed. Good luck

QualityToolsPackage failed to load in build?

I am using Bamboo [from Altassian] and it uses the devenv.com builder to build solution files. Currently, I seem to be getting a "false" error in my builds - that I've tried to solve by myself but just can't - so I thought I would ask.
Each build succeeds normally - without errors stemming from code - but seems to instead give this error
Package 'Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed to load.
I've no idea why this is causing problems in the devenv.com environment and I can't figure out either how to "ignore" this error by some build command?
Try this ( from MSFT support )
Can you check if the dll is in the global assembly cache (open a VS 2010 command prompt
(Start | All Programs | Microsoft Visual Studio 10.0 | Visual Studio Tools))
Type in
Gacutil –l > list.txt
Notepad list.txt
Do you see an entry like
Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
If so, from the same command prompt, run fuslogvw, go to settings, select log bind failures to disk, select ok
Run your command line
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com /Build "Release|Mixed Platforms" "D:\Builds\19\Test VizXView\VizXView v1.8 Test Release Build - Weekly\Sources\VizXView v1.8\VizXView 1.8.sln"
Click on the refresh button in fuslogvw. Do we get any bind errors?
I had a similar issue related to running unit tests on a build server that was using devenv.exe (not devenv.com). I had a premium VS installed on the build server but I'd written the unit tests with ultimate (which 'has' load testing, even tho I'd not used it). I used fusion viewer to work out that the missing dll was LoadTest.dll which I copied from my laptop to the buildserver, I also removed references in my solution that were in version control to: *.vsmdi and *.testsettings (they're deprecated) and I removed from the build def a reference to a .testsettings file.
My guess would be that even though I wasn't running a load unit test the build agent was trying to load the LoadTest libs just in case. Hope that helps
edit ---
ok, my own problem here was that I've got both vs2010 and vs2013 on my laptop. When I added the first test project to my VS2010 solution, the project added actually has a dependency on the 2013 version of the UnitTestFramework.dll. My build server only has vs2010 on it so I got the missing assembly error. Switching the reference to the 2010 version fixed this.

Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects

I almost have a NAnt script together that will build and deploy VS2010 database projects, but one error stands in my way:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(56,5): error MSB4062: The "SqlBuildTask" task could not be loaded from the assembly Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [xxx]
Failed to start MSBuild.
External Program Failed: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe (return code was 1)
I can see that the Microsoft.Data.Schema assemblies are not in the MSIL GAC on the build server - is there any clean way to do this without a full-freight installation of VS2010 on the build server?
For the curious, I asked Barclay Hill at Microsoft who answered this for me:
You can’t build database projects on
machines unless they have VS or TFS
2010 installed on them. It is not a
supported scenario. You can deploy
database project build outputs without
VS/TFS installed using vsdbcmd. The
only way to do this and be in line
with the licensing and support is to
install a local copy of VS Pro or
higher on your build box if not using
TFS.

Resources