Can't debug Azure Applications with v1.5 of SDK - visual-studio-2010

After upgrading to Azure 1.5, I can't debug Azure applications from VS 2010. When I press F5, I get the following error:
"Could not load file or assembly 'DevFabric.Contracts, Version=0.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
The application runs fine when it's deployed. It was working before I installed 1.5.

An answer has been found in this thread : http://social.msdn.microsoft.com/Forums/en/windowsazuretroubleshooting/thread/f3a0dd74-93fc-4b31-acd1-64362b8976e5
*EDIT: from MSDN forums:
Is the DevFabric.contracts.dll in your C:\program files\windows azure sdk\v1.5\bin\devfabric folder?
If so, try to moving it to the C:\program files\windows azure sdk\v1.5\bin folder and see if that solves the problem?

Related

BizTalk deployment framework throws MSBuild errors MSB4061

I am having some problems with the BizTalk Development Framework.
My BizTalk project builds completely fine. But when using the 'Deploy BizTalk Solution' option from Visual Studio MSBuild is not happy. I am deploying to a server that is on our internal network, but not on the same box as my development machine.
These are the errors (it seems to be complaining about a bunch of missing assemblies, but my setup is a plain BizTalk 2013 R2 development tools install and the deployment framework does it need the full server installing on the dev machine?):
DeployFileAdapterPhysicalPaths: Configuring FILE adapter physical
paths from binding file PortBindings.xml...
Processing FILE adapter physical paths (Send)...
Processing FILE adapter physical paths (Receive)...
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: The "TerminateServiceInstances" task could not be
instantiated from "C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.Tasks.BizTalk.dll".
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: System.IO.FileNotFoundException: Could not load file or
assembly 'Microsoft.BizTalk.Operations, Version=3.0.1.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: File name: 'Microsoft.BizTalk.Operations,
Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: at
DeploymentFramework.BuildTasks.TerminateServiceInstances..ctor()
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061:
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: WRN: Assembly binding logging is turned OFF.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: To enable assembly bind failure logging, set the
registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to
1.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: Note: There is some performance penalty associated with
assembly bind failure logging.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061: To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4061:
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
C:\Program Files
(x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5):
error MSB4060: The "TerminateServiceInstances" task has been declared
or used incorrectly, or failed during construction. Check the spelling
of the task name and the assembly name.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]
Done Building Project
"C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj"
(Deploy target(s)) -- FAILED.
Build FAILED.
In addition to Zee's correct point, this is failing because BizTalk is not installed on your local machine. You cannot deploy from Visual Studio to a remote machine for BizTalk, even using BTDF. It's trying to deploy locally and failing because it can't find some of the BizTalk assemblies that BTDF relies on for deployments.
If you want to deploy remotely, you should use BTDF to build an MSI and run the MSI on that target server(s).
The 'Deploy BizTalk Solution' function in Visual studio is used to deploy your application to local biztalk, not the remote biztalk server.
Official document here:
Deploy and Undeploy an Application
The Deploy BizTalk Solution option will deploy your application into
the local BizTalk server. If the application is already deployed,
then it will be undeployed and re-deployed. The Visual Studio Output
window will display the complete output from the deployment process.
In the end Dan was pretty close here. These errors were caused by the fact I had a installer project in the same solution that installed a custom pipeline in the GAC. It was being very naughty with the dependencies - it detected a lot of Biztalk assemblies as dependencies, but if an uninstall was done it would remove them all! Thus crippling the Biztalk setup on the box.
Point taken about the local install though.

publish project in vs2013

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

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

Using MSBuild.exe To Build A Simple Windows Phone 7 Project

I have a clean, Windows 7 x64 box setup to build and run Windows Phone 7 projects. I installed Windows Phone Developer Tools 7.0, January 2011 Update and Windows Phone Developer Tools Fix as per the MSDN App Hub page. My WP7 applications build fine in VisualStudio, yet when I try to use MSBuild.exe, even on the simplest Visual Studio project
c:\Windows\Microsfot.NET\Framework64\v4.0.30319\MSBuild.exe .\SimpleWP7.sln
I get the following errors (with added space between lines for readability)
... verbose.output ...
C:\Program Files
(x86)\MSBuild\Microsoft\Silverlight
for
Phone\v4.0\Microsoft.Silverlight.Common.targets(185,9):
error MSB4018: The "CompileXaml" task
failed unexpectedly.\r
[C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
C:\Program Files
(x86)\MSBuild\Microsoft\Silverlight
for
Phone\v4.0\Microsoft.Silverlight.Common.targets(185,9):
error MSB4018:
System.IO.FileLoadException: Could not
load file or assembly
'PresentationCore, Version=3.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The given
assembly name or codebase was invalid.
(Exception from HRESULT: 0x80131047)\r
[C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
C:\Program Files
(x86)\MSBuild\Microsoft\Silverlight
for
Phone\v4.0\Microsoft.Silverlight.Common.targets(185,9):
error MSB4018: File name:
'PresentationCore, Version=3.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35'\r
[C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
...
What am I missing here? I have Silverlight 3 and 4 installed and I've installed everything as documented on the App Hub. Please let me know if there is any additional information required.
Cheers,
Alasdair.
I was using the wrong msbuild executable, I should have been using
c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
I'm unsure why, on Windows 7 64bit I should've been using what appears to be msbuild for 32bit applications. Thanks to #keyboardP for directing me to Visual Studio command prompt which helped diagnose 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