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.
Related
I'm getting this error on a new Windows 10 Enterprise 2004 installation with the latest version of Visual Studio 2019 Enterprise installed. I am just trying to compile a stock .NET Core Console app; I get this error when I try to build the solution.
Severity Code Description Project File Line Suppression State
Error MSB4018 The "ResolvePackageAssets" task failed unexpectedly.
NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files
(x86)\Progress\ToolboxNugetPackages'.
at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1
fallbackPackageFolders)
at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders)
at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
at
Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets
task, Byte[] settingsHash)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() ConsoleApp1
C:\Program
Files\dotnet\sdk\3.1.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets
234
I found the problem - one of the installers for a WPF Control I have been using for a while has a bug where it now generates a nuget package cache for UI Controls; the Nuget package does exist and but it's in the wrong location. This specific bug is made manifest when one changes the default installation directory 'C:\Program Files (x86)\Progress'. To remedy the situation I copied the Nuget Cache to the expectant location and the problem went away.
Here at my new work, we are forced to use Microsoft Team Foundation Server 2008, for our builds.
Even most of developers already moved to VS 2010, and 2012, but the build server is still TFS 2008.
Any way, I am working with VS 2010 project, and I built the "default build definition", on 2008 TFS server.
The build is failing.
Looking at the log, it is trying to delete the workspace "agentserver_104_" but didn't find it, but then later try to create the workspace "agentserver_104_". but it fails because there is already a workspace called "agentserver_104".
This is the error message with the log
Target "CoreInitializeWorkspace" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets"
Using "DeleteWorkspaceTask" task from assembly "c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll".
Task "DeleteWorkspaceTask"
DeleteWorkspaceTask TeamFoundationServerUrl="http://xxxxx:8080/" BuildUri="vstfs:///Build/Build/21924" Name="agentserver_104_" DeleteLocalItems=True
TF14061: The workspace agentserver_104_;TCPL\TFSBuild does not exist.
Done executing task "DeleteWorkspaceTask".
Task "DeleteWorkspaceTask" skipped, due to false condition;
Using "CreateWorkspaceTask" task from assembly "c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll".
Task "CreateWorkspaceTask"
CreateWorkspaceTask TeamFoundationServerUrl="http://xxxxx:8080/" BuildUri="vstfs:///Build/Build/21924" Name="agentserver_104_"
BuildDirectory="E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7" SourcesDirectory="E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources" Comment="Workspace created by Team Build"
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5,801,5): error : The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace agentserver_104.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.MappingConflictException: The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace DAPP03085_104.
Notice that when it tried to delete the workspace, it uses the name agentserver_104_
But the existing name was : agentserver_104
Without the trailing underbar.
any idea?
There seems to be a problem with probably referenced projects i suppose. Because the real error is The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace DAPP03085_104. So I think you need to check that one.
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.
I made a report on Reporting Services 2005 which consumes an external assembly, I added that assembly to the project:
Report - Report Properties - References
I also copied the assembly to the folders:
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
My report works fine it I hit F5, even on the Preview in Visual Studio Designer, but when I try to deploy the report (right click - Deploy) and point to a remote Reporting Services Server (http://myserver/reportserver) I got the error:
Error 3 Error while loading code module: ‘XXXXXXXXXXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc704fc78adc7af4’. Details: Could not load file or assembly 'XXXXXXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc704fc78adc7af4' or one of its dependencies. The system cannot find the file specified. c:\MyReport\Report.rdl 0 0
(NOTE: I replaced the name of the assembly with XXXXXXX and changed the path of my report. Consider that the file "c:\MyReport\Report.rdl" is already there, it's the report I'm working on).
Hope you can help me solve this problem to deploy to my remote reporting server.
Thanks.
After 3 days of headaches, I found out what I was doing wrong with the report deploy (This was my first time deploying a reporting services 2005 report).
If anyone else is interested: you need to copy the assembly to these folders ON THE SERVER (where you wish to deploy):
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
And that's it. Don't forget to change the data source of your report to use the correct credentials.
As I am not able to place any comment, I am putting my few doubts here.
Is the above process same as deployment in Sharepoint?
Are you mentioning the "TargetDataSource Folder", "TargetDataSet folder" and so on?
Will it work if I would copy the assembly file in below folder path of SharePoint Server:
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Svices\ReportServer\bin
C:\Program Files\Microsoft Visual Studio 8Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft Visual tudio 8\Common7\IDE\PublicAssemblies
I'm using VS2010 RC while targeting .NET 3.5. I can run code analysis via Visual Studio without a problem. However, when I try to run code analysis on our CI server it isn't getting executed. When I attempt to build using msbuild 4.0 I get the following exception:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: The "CodeAnalysis" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Like I said, it works fine when I run it through VS.
You will have tough times to set this up...
I would install VS2010 on the build server. Problem solved.
Note:
The Build server should be a replication of your developer environment (not production environment)