I have some trouble with deploy from Visual Studio 2010 Professional .
This is error
Error 1 Error registering plugins and/or workflows. An unexpected
error occurred. C:\Program Files
(x86)\MSBuild\Microsoft\CRM\Microsoft.CrmDeveloperTools.CrmClient.targets 176 4 EPAM.Plugins.Deployment
I have found this file and 176 line.
Deploy the Plugins and Workflows using the registration file(s)
============================================================ -->
<Target Name="PluginsAndWorkflowsDeploy" Condition="'#(RegisterPlugin)' != ''">
<Message Text="WorkingFolder: $(Workingfolder)" Importance="high" />
<RegisterPlugin // this is 176 line
DiscoveryServer="$(CRMDiscoveryServer)"
Port="$(CRMDiscoveryServerPort)"
Scheme="$(CRMDiscoveryServerScheme)"
Organization="$(CRMOrganization)"
Password="$(CRMUserPassword)"
UserName="$(CRMUserName)"
Domain="$(CRMUserDomain)"
SolutionName="$(CRMSolutionName)"
RegistrationFile="%(RegisterPlugin.Identity)"
WorkingFolder="$(WorkingFolder)"
/>
</Target>
//if it is important: We use git as source control.
If you know something about this error please help.
RegisterFile.crmregister file in CRMPackage project MUST be writeable. It is possibly marked as read only by git.
Related
OK, bit of a weird one - I have a batch file which converts a .svg file into a header file, like so:
svg_header.bat
echo %1 -> %2
#(
echo const char *%~n1_svg = R"***(
type %~1
echo ^)***";
) > %~2
So, for example, if I have images\normal.svg I can go
svg_header.bat images\normal.svg images\normal_svg.h
And the resulting header file can be included in a C++ source file like so
#include "images\\normal_svg.h"
So far so good.
In my Visual Studio project, I have added 3 .svg files and specified a Custom Build Tool for them as follows:
The strange thing is that each time I build the project, it only works for one of the files.
So the output looks like this:
Build started...
1>------ Build started: Project: mic_muter, Configuration: Debug x64 ------
1>SVG to Header microphone_mute
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): warning MSB8065: Custom build for item "images\microphone_normal.svg" succeeded, but specified output "u:\dev\hid_kbd\mic_muter\mic_muter\images\microphone_normal_svg.h" has not been created. This may cause incremental build to work incorrectly.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): warning MSB8065: Custom build for item "images\microphone_base.svg" succeeded, but specified output "u:\dev\hid_kbd\mic_muter\mic_muter\images\microphone_base_svg.h" has not been created. This may cause incremental build to work incorrectly.
1>mic_muter.cpp
1>U:\dev\hid_kbd\mic_muter\mic_muter\mic_muter.cpp(5,10): fatal error C1083: Cannot open include file: 'images/microphone_normal_svg.h': No such file or directory
1>Done building project "mic_muter.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
If I build the project again, the next file will be converted but the 3rd one fails with the same error. Building for a third time gets the last one and the build succeeds.
Does anyone understand what's going on here? I've tried basically every combination of all the different fields in the Custom Build Tool property page, but the same behaviour persists.
The .vcxproj section for each file is identical (apart from the source filename) and looks like this:
<CustomBuild Include="images\microphone_mute.svg">
<FileType>Document</FileType>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">SVG to Header %(Filename)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">SVG to Header %(Filename)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">SVG to Header %(Filename)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">SVG to Header %(Filename)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)images\%(Filename)_svg.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)images\%(Filename)_svg.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)images\%(Filename)_svg.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)images\%(Filename)_svg.h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)svg_to_header.bat %(FullPath) $(ProjectDir)images\%(Filename)_svg.h</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)svg_to_header.bat %(FullPath) $(ProjectDir)images\%(Filename)_svg.h</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)svg_to_header.bat %(FullPath) $(ProjectDir)images\%(Filename)_svg.h</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)svg_to_header.bat %(FullPath) $(ProjectDir)images\%(Filename)_svg.h</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)svg_to_header.bat</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)svg_to_header.bat</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)svg_to_header.bat</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)svg_to_header.bat</AdditionalInputs>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ClInclude</OutputItemType>
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</VerifyInputsAndOutputsExist>
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</VerifyInputsAndOutputsExist>
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</VerifyInputsAndOutputsExist>
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</VerifyInputsAndOutputsExist>
</CustomBuild>
I am trying to install the Visual Studio 2017 extension Multiligual App ToolKit 4.0. everything installed correctly and i managed to get some translation but when ever i go to build my app i get this error
Description:
"illegal Characters in path."
File:
"Microsoft.Multilingual.ResxResources.targets"
Line: 32
this is line 32:
<MultilingualBuild
ContinueOnError="ErrorAndContinue"
AppName="$(MSBuildProjectName)"
ProjectPath="$(MSBuildProjectFullPath)"
SourceCulture="$(DefaultLanguage)"
EmbeddedResource="#(EmbeddedResource);#(Content)"
XliffResource="#(XliffResource)"
None="#(None)"
BuildServerInfo="$(TeamFoundationServerUrl)"
CachePath="$(IntermediateOutputPath)"
HasSharedItems="$(HasSharedItems)"
MSBuildAllProjects="$(MSBuildAllProjects)"
TranslationReport="$(TranslationReport)"
SuppressPseudoWarning="$(SuppressPseudoWarning)"
/>
it is within this node
<Target Name="MultilingualAppToolkit" BeforeTargets="PrepareForBuild" Condition="'$(IsCrossTargetingBuild)' != 'true' AND '$(IsWpfTempProject)' != 'true' ">
has anyone had this problem before or know where/how i can start to debug?
Thanks
i have fixed this by removing the Xamarin.LiveReload Nuget package.
I got this error when I created a website in Visual Studio 2013:
File name: redirection.config
Error: Cannot read configuration file
I had the similar issue could not even start a web project in vs 2013
So i tried the following
Unable to create a new web project in Visual Studio 2013
Had same issue in visual-studio 2015. Tried many solutions, used Process Monitor to identify a missing directory structure, copied the 'config' folder -
C:\Program Files (x86)\IIS Express\ -> C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
Also using the change iis express user home fix -
eg. C:\Program Files (x86)\IIS Express\iisexpress.exe /userhome:c:\temp\iisexpress
Need to delete existing iisexpress folder, usually in [home]\documents folder.
I had the same problem. I looked in the file, and it was corrupted, only filled with NUL.
Fortunately I was able to recover the same file from my old PC:
<configuration>
<configSections>
<section name="configurationRedirection" />
</configSections>
<configProtectedData>
<providers>
<add name="IISRsaProvider" type="" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="iisConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
</providers>
</configProtectedData>
<configurationRedirection />
</configuration>
Probably you can even leave the providers tag empty.
I got the following error.
error MSB3073: The command "copy app.config “D:\Projects\Sdk.dll.config”
:VCEnd" exited with code 1. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 113
I did not understand what error it is.
On clicking the error message, it is navigated to the [Microsoft.CppCommon.targets] file, to the following code.
<Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
<Message Text="Description: %(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''"/>
<Exec Command="%(PostBuildEvent.Command)$(BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/>
</Target>
What is the error and how can I fix it?
There is a post-build command which is trying to execute a copy that is failing. The most likely cause is a user defined command in the vcproj file which is failing. Check your projects for any block in a post-build task. That is the likely source of the error
I have a post build step in an msbuild config which executes a powershell script. The powershell script works perfectly if I call it directly from Powershell but fails via msbuild.
It seems it fails after it tries to use classes from the import:
Import-Module WebAdministration
I get the error "Error : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error : 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
I've tried changing the version of powershell loaded by msbuild from 64bit to 32bit but it makes no difference.
Here is the msbuild step:
<Target Name="DevPostBuild">
<PropertyGroup>
<PowerShellExe Condition=" '$(PowerShellExe)'=='' ">%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe</PowerShellExe>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">$(ProjectDir)DevPostBuild.ps1</ScriptLocation>
</PropertyGroup>
<Message Text="$(ScriptLocation)" />
<Exec Condition="Exists($(ScriptLocation))" Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { &'$(ScriptLocation)' } "" />
I'm using VS2010 on a 64bit machine.
Thanks!
Visual Studio 2010 is a 32bit process. Powershell will then run as a 32bit process. The WebAdministration module is 64bit only. Try using %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe for PowerShellExe.
Same in Visual Studio 2017, using syswow64's powershell.exe gives no difference. I had similar challenge while controlling IIS from within MSBuild XML and go same error messages about clases not registered. The Stop-WebAppPool and Stop-Website are useless therefore in MSBuild XML, as all from WebAdministration module, not mentioning Stop-IISSite from IISAdministration module.
In my case I had to utilize old good AppCmd executable from IIS. Works smooth, no issues. I also had the case when application pools and web sites are already stopped so be aware I ignore any error codes.
<Exec Command="$(WinDir)\SysWOW64\inetsrv\appcmd.exe stop apppool /apppool.name:"My Application Pool"" IgnoreExitCode="true" />
<Exec Command="$(WinDir)\SysWOW64\inetsrv\appcmd.exe stop site /site.name:"My Web Site"" IgnoreExitCode="true" />