MSBuild error compiling wdproj - MSB4184
-
Monday, February 20, 2012 6:57 PM
I am trying to using command line to build a solution that contains two wdproj projects. I am getting an error MSB4184. The given path's format is not supported.
How can I fix that?
I have also tried to use /ignore:wdproj but those projects still give the same errors.
I need to either fix the errors or ignore those projects.
Thanks,
All Replies
-
Wednesday, February 22, 2012 8:22 AMModeratorHi dbartforum,
Error handing is the new feature in MSBUILD 4.0. The functions parser is pretty robust but not necessarily that helpful when it doesn't work.
Could you please provide more information about error MSB4184, you can refer to the following MSB4184 error:
(1) error MSB4184: The expression "…" cannot be evaluated. It treated it as a function, but probably it couldn't parse it.
(2) error MSB4184: The expression "…" cannot be evaluated. Method '…' not found. It could parse it, but not find a member it could coerce to, or it was considered ambiguous by the binder. Verify you weren't calling a static member using instance member syntax. Try to make the call less ambiguous between overloads, either by picking another overload (that perhaps has a unique number of parameters) or using the Convert class to force one of the parameters explicitly to the type the method wants. One common case where this happens is where one overload takes an integer, and the other an enumeration.
(3) error MSB4184: The expression "[System.Text.RegularExpressions.Regex]::Replace(d:\bar\libs;;c:\Foo\libs;, \lib\x86, '')" cannot be evaluated. parsing "\lib\x86" - Unrecognized escape sequence \l. Here's an example where it bound the method, but the method threw an exception ("unrecognized escape sequence") because the parameter values weren't valid.
In addition, you can try to readd your directory, see whether it is helpful.
If you still cannot solve this issue, please provide reproduce steps for us to reproduce this isssue.
Thank you for your understanding!
Reference:
http://blogs.msdn.com/b/msbuild/archive/2010/05/05/msbuild-property-functions-2.aspx
http://social.msdn.microsoft.com/Forums/zh-CN/msbuild/thread/f1291dd1-726c-4e0a-87df-bddff7ccbf51Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
-
Thursday, February 23, 2012 2:56 PM
This is the build command:
MSBUILD "C:\XXXXXXXX\XXX.XXXX\XX\XXXXXX\XXXXXXXX\XXXX.sln" /t:rebuild /p:ReferencePath="C:\Build\Output\Framework;C:\Build\Output\Facade" /p:OutputPath="C:\Build\Output\XXXX" /p:Configuration="Debug" /p:Platform="Any CPU"
Below is the error message:
C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets(288,5): error MSB4184: The expression "[System.IO.Path]::GetFullPath(C:\XXXXXXXX\XXX.XXX\XX\XXXXX\XXXXXXXX\WDP_XXX.XXXX.XXXXXXXXXXXXXXX.XXXXXXXXXX\C:\Build\Output\XXXX)" cannot be evaluated. The given path's format is not supported. [C:\XXXXXXXX\XXX.XXXX\XX\XXXXXX\XXXXXXXX\WDP_XXX.XXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXX\WDP_XXX.XXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.wdproj]
-
Monday, February 27, 2012 9:03 AMModeratorHi dbartforum,
Please provide the steps or sample code for us to reproduce this issue.
We will try our best to help solve this issue.Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
-
Monday, February 27, 2012 5:23 PM
This is the build command:
MSBUILD "C:\TEMP\Build\Solution\MyTest\MyTest.sln" /t:rebuild /p:OutputPath="C:\TEMP\Build\Output" /p:Configuration="Debug" /p:Platform="Any CPU"
Below is the project XML for WDP_MyTest.MyTest.WebDeployment:
<?xml version="1.0" encoding="utf-8"?>
<!--
Microsoft Visual Studio 2010 Web Deployment Project
http://go.microsoft.com/fwlink/?LinkID=104956
-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.30319</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AFD28133-C213-4722-8FE0-DE28B739AD23}</ProjectGuid>
<SourceWebPhysicalPath>..\MyTest</SourceWebPhysicalPath>
<SourceWebProject>{1D4E2A15-3438-4021-BB29-6870675614AC}|MyTest.csproj</SourceWebProject>
<SourceWebVirtualPath>/MyTest.csproj</SourceWebVirtualPath>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>.\Debug</OutputPath>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>WDP_MyTest.MyTest.WebDeployment</SingleAssemblyName>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MyTest\MyTest.csproj">
<Project>{1D4E2A15-3438-4021-BB29-6870675614AC}</Project>
<Name>MyTest</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.WebDeployment.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="BeforeMerge">
</Target>
<Target Name="AfterMerge">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>If there is any way I can submit code files / solution - I can do that.
- Edited by dbartforum Monday, February 27, 2012 5:24 PM
-
Monday, February 27, 2012 7:34 PM
I have just found out that if I take out:
/p:OutputPath="C:\TEMP\Build\Output"
The solution then builds.
But I do not want to do that since I want the output to be placed in the output folder.
-
Wednesday, February 29, 2012 5:51 AMModerator
Hi dbartforum,
If you don’t use the /p:OutputPath, try to set the output path in your project file.
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>.\Debug</OutputPath>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>WDP_MyTest.MyTest.WebDeployment</SingleAssemblyName>
</PropertyGroup>
Change the <OutputPath> from the “.\Debug” to “C:\TEMP\Build\Output”
But why do you want to save the output files to the Temp folder? The C:\TEMP folder is used for temporary storage. So if you still cannot solve this issue, I suggest you change your Output folder directory.Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by lucy-liuModerator Thursday, March 08, 2012 2:51 AM
-
Thursday, March 08, 2012 2:51 AMModerator
Hi dbarforum,
I temporary make my last reply as answer. You can unmark it if they provide no help.
Thank you for your understanding!
Lucy Liu [MSFT]
MSDN Community Support | Feedback to us

