I am facing an issue with Visual Studio 2015. When I click on new project/add new file, I get an error message. I get this error even for clicking few menu items.
Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.
I even get few more errors like:
The 'XamlDesignerPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\MY PC\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
Restarting Visual Studio could help resolve this issue.
I have tried repair and reinstall(uninstall and install again) both didn't have any effect.
These are the errors found in ActivityLog.xml
<entry>
<record>392</record>
<time>2018/02/09 02:11:35.915</time>
<type>Error</type>
<source>Extension Manager</source>
<description>Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\10\DESKTOP SDK\...</description>
<path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
<entry>
<record>400</record>
<time>2018/02/09 02:11:47.980</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.Workspaces.Contracts, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Could not find or load a type. (Exception from HRESULT: 0x80131522)</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\HEXW0BB4.KCG\TMLanguage.dll</path>
<entry>
<record>420</record>
<time>2018/02/09 02:12:00.074</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [ServiceProviderPackage]Source: 'GitHub.VisualStudio' Description: Could not load type 'GitHub.Services.IUIProvider' from assembly 'GitHub.Exports, Version=2.4.2.1331, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e'.
System.TypeLoadException: Could not load type 'GitHub.Services.IUIProvider' from assembly 'GitHub.Exports, Version=2.4.2.1331, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e'.
at GitHub.VisualStudio.ServiceProviderPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)
at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at Microsoft.VisualStudio.Services.VsTask.GetResult()</description>
<guid>{D5CE1488-DEDE-426D-9E5B-BFCCFBE33E53}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
And there are few more.
Related
I just go into Extensions>Manage Extensions>Update, click "Update All" and then close Visual Studio.
The installation just give me a error, i searched online but no clue what's wrong.
Already repaired and reinstalled completely visual studio
Any help? This is the error log.
22/05/2021 22:41:45 - Microsoft VSIX Installer
22/05/2021 22:41:45 - -------------------------------------------
22/05/2021 22:41:45 - vsixinstaller.exe version:
22/05/2021 22:41:45 - 16.9.2017
22/05/2021 22:41:45 - -------------------------------------------
22/05/2021 22:41:45 - Command line parameters:
22/05/2021 22:41:45 - A:\Microsoft Visual Studio\2019\Community\Common7\IDE\vsixinstaller.exe,/appidinstallpath:A:\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe,/skuName:Community,/skuVersion:16.9.31313.79,/appidname:Microsoft Visual Studio Community 2019,/culture:en-US,/noep,C:\Users\erikm\AppData\Local\Temp\VSIXdc234dfy.vsix,C:\Users\erikm\AppData\Local\Temp\VSIXygjj5kfo.vsix,C:\Users\erikm\AppData\Local\Temp\VSIXityxfypz.vsix
22/05/2021 22:41:45 - -------------------------------------------
22/05/2021 22:41:45 - Microsoft VSIX Installer
22/05/2021 22:41:45 - -------------------------------------------
22/05/2021 22:41:45 - System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Validation, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.VisualStudio.Validation, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at VSIXInstaller.SupportedSKUs.AddInstalledIsolatedShells(Version vsVersion, IntPtr userToken)
at VSIXInstaller.SupportedSKUs.InitializeSupportedSKUs(IntPtr userToken)
at VSIXInstaller.ExtensionService.InitializeSupportedSKUs(ICommandLineData cmdLineData, IntPtr duplicatedUserToken)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
After deleting all "Microsoft.VisualStudio.Validation.dll" found by a file explorer search and reinstalling visual studio, it worked!
I downloaded extension in visual studio 2019 but while installing error occurred.
install log is this:
4/25/2021 8:41:33 PM - Microsoft VSIX Installer
4/25/2021 8:41:33 PM - -------------------------------------------
4/25/2021 8:41:33 PM - vsixinstaller.exe version:
4/25/2021 8:41:33 PM - 16.9.2017
4/25/2021 8:41:33 PM - -------------------------------------------
4/25/2021 8:41:33 PM - Command line parameters:
4/25/2021 8:41:33 PM - C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VSIXInstaller.exe,C:\Users\Usman\Downloads\ProductivityPowerPack2017.vsix
4/25/2021 8:41:33 PM - -------------------------------------------
4/25/2021 8:41:33 PM - Microsoft VSIX Installer
4/25/2021 8:41:33 PM - -------------------------------------------
4/25/2021 8:41:34 PM - System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Validation, Version=15.3.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.VisualStudio.Validation, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at VSIXInstaller.SupportedSKUs.AddInstalledIsolatedShells(Version
vsVersion, IntPtr userToken)
at VSIXInstaller.SupportedSKUs.InitializeSupportedSKUs(IntPtr userToken)
at VSIXInstaller.ExtensionService.InitializeSupportedSKUs(ICommandLineData
cmdLineData, IntPtr duplicatedUserToken)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception
exceptionObject)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Run a repair of your Visual Studio installation.
If repair doesn't work, you might've moved your VS install and now it won't install anything.
This is because it "might" be finding the VS Installer in a directory OTHER than the standard one. Reinstall the installer itself, then try to install the extension or whatevs
Check if this path exists on your C drive. The "Packages" folder is used to save VS extensions which VS needs. I'd moved mine to F drive to save space. The error message didn't help me much.
C:\ProgramData\Microsoft\VisualStudio\Packages
Struggling with this, project builds and deploys when I don't have EventReceivers in my Features, and fails when I do. I'm not entirely sure which file the FileNotFoundException is referring to
Error given in visual studio
Error 1 Error occurred in deployment step 'Activate Features': Failed to load receiver assembly "Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd" for feature "Decisions.Features_DeployDecisionCommittee" (ID: 779492d8-f053-45ce-8340-5fa6d7f87a90).: System.IO.FileNotFoundException: Could not load file or assembly 'Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd' or one of its dependencies. The system cannot find thefile specified.
File name: 'Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
=== Pre-bind state information ===
LOG: DisplayName = Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/
LOG: Initial PrivatePath = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\VstspCache7880
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\vssphost5.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
0 0 Decisions.Features
Assembly Binging Log Viewer
* Assembly Binder Log Entry (25/04/2014 # 11:11:41) *
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\vssphost5.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/
LOG: Initial PrivatePath = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\VstspCache7880
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = vssphost5.exe
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\vssphost5.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/Decisions.Features/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/VstspCache7880/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/VstspCache7880/Decisions.Features/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/PublicAssemblies/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/PublicAssemblies/Decisions.Features/Decisions.Features.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/Decisions.Features.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/Decisions.Features/Decisions.Features.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/VstspCache7880/Decisions.Features.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/VstspCache7880/Decisions.Features/Decisions.Features.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/PublicAssemblies/Decisions.Features.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/PublicAssemblies/Decisions.Features/Decisions.Features.EXE.
LOG: All probing URLs attempted and failed.
Help
This is what worked for me,
First resolution:
· Retract the Solution/WSP in VS.
· Close VS.
· Reopen VS and deploy the Project.
Second resolution:
If closing VS after retraction doesn't solve the problem then a larger workaround is:
· Redeploy the project -> This will show an error during feature activation.
· Go to SharePoint UI and Activate and then Deactivate the deployed feature that was showing activation error in VS.
· Retract the Solution/WSP in VS.
· Close VS.
· Reopen VS and deploy the Project.
http://support.microsoft.com/kb/2022443
This works for me.
Right click on the project and select properties. In the properties menu, choose signing. While in the signing tab, under choose a strong name key file select new and key in a key name. Then select no password needed. After all is done rebuild the file and you can start deploying.
This worked for me: Change the version of your VS project in assembly information. For example, i changed the assembly and file version to 1.1.0.0 instead of 1.0.0.0.
Deployed and no problems.
Afterwards i could just set it back to 1.0.0.0 and continue on deploying without errors or problems...
Another solution which helped me:
Go to the site you are deploying to, and activate feature from UI.
Redeploy from Visual Studio.
I'm currently working on a build for a project, but I'm facing difficulties with the TFS Build.
I just want to create a zip package, using a TFS Build, with parameters from IIS Express.
CSPROJ configuration:
IIS Express is present on my machine and on the build server (I can access to the *.svc files in the project).
And all is on source control.
When I use the "Build Deployment Package" on my machine, I've got the zip.
When I use the "Build Deployment Package" on the build server, I've got the zip.
When I use the MSBuild's command line on both, I've got the zip.
The command line in question :
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "C:\WORKSPACES\[...]\Project.csproj" /p:Platform=AnyCPU;Configuration=Release /p:DeployTarget=Package /p:DeployOnBuild=true;DefaultPackageFileName=ZipName.zip
But when I put the same command line in a build, it fails:
"C:\Builds\2\[...]\Project.csproj" (default target) (1) ->
(PackageUsingManifest target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Web deployment task failed.(Object of type 'manifest' and path 'C:\Builds\2\Project Release\Binaries\_PublishedWebsites\Project_Package\Project.SourceManifest.xml' cannot be created.) [C:\Builds\2\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : [C:\Builds\2\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Object of type 'manifest' and path 'C:\Builds\2\Project Release\Binaries\_PublishedWebsites\Project_Package\Project.SourceManifest.xml' cannot be created. [C:\Builds\2\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : One or more entries in the manifest 'sitemanifest' are not valid. [C:\Builds\2\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Site '' does not exist. [C:\Builds\2\[...]\Project.csproj]
Additional Infos, line 3009 refer to:
<VSMSDeploy Condition="!$(UseMsdeployExe)"
MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
Source="#(MsDeploySourceProviderSetting)"
Destination="#(MsDeployDestinationProviderSetting)"
DeploymentTraceLevel="$(PackageTraceLevel)"
DisableLink="$(PackageDisableLinks)"
EnableLink="$(PackageEnableLinks)"
DeclareParameterItems="#(_Package_MsDeployDeclareParameters)"
OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
ImportDeclareParametersItems="$(_VsPackageParametersFile)"
ReplaceRuleItems="#(MsDeployReplaceRules)"
RetryAttempts="$(RetryAttemptsForDeployment)">
I know I'm missing something, but I don't see what... so, if you have suggestions...it will be very welcome! :)
The tfs build did not run with the same account than me when I'm logged on the build server.
Is IIS Express is well launch with a tfs build ?
When I look in C:\Users\svcTfsBuild\Documents, there is no IISExpress directory, like with my user (svcTfsBuild is the service account for TFS Build).
The main goal:
Obtain a zip package with a tfs build with those parameters (parameters.xml within the zip package).
OR
Have a zip package where we can specify Application Pool and Physical Path when importing.
Like this:
<parameters>
<parameter name="IIS Web Application Name" defaultValue="Default Web Site/Project" tags="IisApp">
<parameterEntry kind="ProviderPath" scope="AppHostConfig" match="^ProjectTest/Project$" />
<parameterEntry kind="ProviderPath" scope="contentPath" match="^C:\\WORKSPACES\\[...]\\obj\\Release\\Package\\PackageTmp$" />
<parameterEntry kind="ProviderPath" scope="setAcl" match="^C:\\WORKSPACES\\[...]\\obj\\Release\\Package\\PackageTmp$" />
</parameter>
<parameter name="IIS Web Application Pool Name" defaultValue="ASP.NET v4.0">
<parameterEntry kind="DeploymentObjectAttribute" scope="application" match="application[#applicationPool='Clr4IntegratedAppPool']/#applicationPool" />
</parameter>
<parameter name="IisVirtualDirectoryPhysicalPath" defaultValue="D:\CompanyName\Project" tags="PhysicalPath">
<parameterEntry kind="DestinationVirtualDirectory" scope=".*" match="^C:\\WORKSPACES\\[...]$" />
</parameter>
</parameters>
Note : we can's specify the configuration in a parameters.xml directly on the csproj because the workspace are not the same on our machines, on the tfs build server...
I hope this is clear
EDIT: suggestion from drk
Like you said, I run the command line from the service account, and got this, in particular:
GenerateMsdeployManifestFiles:
Generate source manifest file for Web Deploy package/publish ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: The "IsCleanMSDeployPackageNeeded" task failed unexpectedly. [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Web.Deployment.DeploymentException: Object of type 'package' and path 'C:\WORKSPACES\[...]\obj\Release\Package\Project.zip' cannot be created. ---> Microsoft.Web.Deployment.DeploymentException: The Zip package 'C:\WORKSPACES\[...]\obj\Release\Package\Project.zip' could not be loaded. ---> System.UnauthorizedAccessException: Access to the path 'C:\WORKSPACES\[...]\obj\Release\Package\Project.zip' is denied. [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.Win32Native.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.ZipFile.Load() [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.ZipPackageProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String path) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: --- End of inner exception stack trace --- [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.ZipPackageProvider.GetAttributes(DeploymentAddAttributeContext addContext) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.DeploymentObject.EnsureValidAttributes() [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: --- End of inner exception stack trace --- [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.DeploymentManager.CreateObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.DeploymentManager.CreateObject(String provider, String path, DeploymentBaseOptions baseOptions) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Deployment.DeploymentManager.CreateObject(DeploymentWellKnownProvider provider, String path) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: --- End of inner exception stack trace --- [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Publishing.Tasks.DynamicAssembly.CallStaticMethod(String typeName, String methodName, Object[] arguments) [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.Execute() [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\WORKSPACES\[...]\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) [C:\WORKSPACES\[...]\Project.csproj]
Done Building Project "C:\WORKSPACES\[...]\Project.csproj" (default targets) -- FAILED.
Build FAILED.
I've checked the service account (SvcTfsBuild in my case).
He has full control over the workspace (so the source code).
And my account and the SvcTfsBuild account are on the same groups (local administrator).
But the TFS BUILD log (verbose mode) did not show any permission problem...
EDIT 2013/03/25
I've uncheck the checkbox "Use IIS Express" in the Web tab.
The build generate the good zip package.
So, I asume there is a problem only with IIS Express.
In the build, I've had an "InvokeProcess" on the sequence "Run On Agent", just after "CreateLabel".
It launch ISS Express with those arguments :
/site:Project-Site
In the log file, I've got a Result to 0 (so, I assume ISS Express is well launch, if not, it is supposed to throw an exception).
But, if the command line is not well formed or wrong (ie: with /site and /path wich cannot be combined), the result is also 0.
And if I launch ISS Express that way, the build is stopped (iisexpress wait a manual action to stop or just listen).
EDIT 2 2013/03/25
To launch IIS Express in the same time than the build, I've made this :
On the Parallel, I've got a variable named "BuildFinished" wich is set to True in the Finally of the build process (on left).
But, I've again the same error (Site '' does not exist).
I've also find a difference between the two Project.SourceManifest.xml when build through "Build Deployment Package" (in VS2010) and through the TFBUILD.
Build Deployment Package :
<?xml version="1.0" encoding="utf-8"?>
<sitemanifest>
<appHostConfig path="Project-Site/Project" />
<contentPath path="C:\WORKSPACES\Project\obj\Release\Package\PackageTmp" />
<setAcl path="C:\WORKSPACES\Project\obj\Release\Package\PackageTmp" setAclResourceType="Directory" />
<setAcl path="C:\WORKSPACES\Project\obj\Release\Package\PackageTmp" setAclUser="anonymousAuthenticationUser" setAclResourceType="Directory" />
</sitemanifest>
TFBUILD :
<?xml version="1.0" encoding="utf-8"?>
<sitemanifest>
<appHostConfig path="/Project" />
<contentPath path="C:\Builds\1\Project\obj\Release\Package\PackageTmp" />
<setAcl path="C:\Builds\1\Project\obj\Release\Package\PackageTmp" setAclResourceType="Directory" />
<setAcl path="C:\Builds\1\Project\obj\Release\Package\PackageTmp" setAclUser="anonymousAuthenticationUser" setAclResourceType="Directory" />
</sitemanifest>
The path value is not the same.
After a couple of trys, I think the problem is between IIS Express and MSDeploy wich can't work together (this is the one saying "Site '' does not exist.").
So, instead of thrying to make it work, we change our mind to use a configuration wich works: modifying the csproj during the build processs in order to use IIS.
Step 1: IIS on the build server
Create an application pool: the name and the Framework version are the two things that matters. Nothing more.
Create the application: name and application pool are important. You can use C:\temp as physical path.
Step 2: Build's definition
You have two choices: create a custom build activity (better one) or do it inside the xaml (ugly one).
The goal, is to have the followings steps:
On the "Run On Agent" sequence, just after the "If Create Label"
Remove the readonly attribute on the targeted csproj (the one on the workspace created by TFS)
Read the csproj's content
Replace the following XML tags
<UseIISExpress>True</UseIISExpress> by <UseIISExpress>False</UseIISExpress>
<UseIIS>False</UseIIS> by <UseIIS>True</UseIIS>
<IncludeIisSettings>False</IncludeIisSettings> by <IncludeIisSettings>true</IncludeIisSettings>
<IISUrl>{IIS Express URL}</IISUrl> by <IISUrl>{IIS URL}</IISUrl>
/!\ Beware: the booleans can be True or true!
/!\ Beware2: if using Cassini, the IISUrl's tag may have a word wrap, like:
`<IISUrl>
</IISUrl>`
This happened only with one of the 4 dev's machine.
{IIS Express URL}: is like http://localhost:8080/ or http://localhost:8080/Application with IIS Express or empty with Cassini.
{IIS URL}: is like http://localhost/Application.
And finally, overwrite the csproj (remember, the one in the TFS's workspace, not the on on source control) with the modify content.
{IIS Express URL} and {IIS URL} can be arguments from the build, but only if the build take the csproj one by one (1 build = 1 zip package, so 1 csproj have to be modified).
With that solution (I think there is a better one that I don't know), we use a configuration that we know it works.
When the zip package will be import in IIS, the application pool and the physical path can be change.
And this is our goal.
Hope this helps.
I have been trying to solve an assembly binding issue for the last 12 hours, with not much luck. Last week, I had upgraded all of the projects in a solution from EF 4.1.0.0 to EF 4.3.1.0. I added some tests this morning to an existing test project, cleaned and recompiled the solution. All the projects compile with no warnings or errors. At my entity framework call anywhere in the project, I receive the following exception:
Initialization method
NutricityPPCTests.Common.DizzleProductExtensionsTests.TestSetup threw
exception. System.IO.FileLoadException: System.IO.FileLoadException:
Could not load file or assembly 'EntityFramework, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040).
I fired up the fusion assembly binding log viewer, and found the log entry that corresponds to the exception. I have verified that my test project, the MOMData project both are referencing the correct EF4.3.1.0 assembly. I verified there were no references to EF 4.1.0.0 in the project files. I deleted the contents of the obj and bin directories in both projects. The project has been cleaned and rebuilt so many times, that my hard drive is probably going to give out tomorrow.
*** Assembly Binder Log Entry (3/22/2012 # 5:55:11 PM) ***
The operation failed.
Bind result: hr = 0x80131040. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = NUTRICITY0\awolske
LOG: DisplayName = EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///C:/Users/awolske/Documents/NutricityWorkspace/Nutricity/NutricityPPCTests/bin/Release
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = QTAgent32.exe
Calling assembly : MomData, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\awolske\Documents\NutricityWorkspace\Nutricity\NutricityPPCTests\bin\Release\NutricityPPCTests.DLL.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Users/awolske/Documents/NutricityWorkspace/Nutricity/NutricityPPCTests/bin/Release/EntityFramework.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Users\awolske\Documents\NutricityWorkspace\Nutricity\NutricityPPCTests\bin\Release\EntityFramework.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Where else should I be looking for the old referenced assembly?!? Any help would be welcome, and greatly appreciated! Thanks in advance for your time!
Add the following to your web.config file:
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I had the same error. Most of the projects in my solution where referencing the Entity Framework 4.3.0.0 dll, but when I checked the references for all the projects in my solution, I found some projects referencing the Entity Framework 4.1.0.0 dll. Removing and replacing them with new references to the Entity Framework 4.3.0.0 dll fixed the problem.