locked
Visual Studio 2012 RC throws InvalidProjectFileException (Cannot evaluate the item metadata "%(FullPath)" - ErrorCode=MSB4023) when build a custom project created from MPF Custom Project Sample ('My Custom Project') RRS feed

  • Question

  • Hi,

    Could you please help me investigate on the problem on Visual Studio 2012 RC with MPF CustomProject sample.

    I'm using Microsoft Windows 7 Enterprise.

    MPF project homepage is at http://mpfproj10.codeplex.com/

    Steps to produce this issue:

    1. Download the above file and open the CustomProject solution. 

    Start external program = C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe

    Command line arguments = /RootSuffix Exp

    Build and start debug it. It will open new instance of Visual Studio.

    2. Create a project based on My Custom Project template

    3. After project created and open successful on Solution Explorer, Build it.

    Here is the exception is thrown:

    Microsoft.Build.Exceptions.InvalidProjectFileException was unhandled by user code
      HResult=-2146233088
      Message=Cannot evaluate the item metadata "%(FullPath)". The item metadata "%(FullPath)" cannot be applied to the path "obj\Debug|x86\MyApplication.exe". Illegal characters in path.  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
      Source=Microsoft.Build
      BaseMessage=Cannot evaluate the item metadata "%(FullPath)". The item metadata "%(FullPath)" cannot be applied to the path "obj\Debug|x86\MyApplication.exe". Illegal characters in path.
      ColumnNumber=39
      EndColumnNumber=0
      EndLineNumber=0
      ErrorCode=MSB4023
      HasBeenLogged=true
      HelpKeyword=MSBuild.CannotEvaluateItemMetadata
      LineNumber=4567
      ProjectFile=C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
      StackTrace:
           at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
           at Microsoft.Build.Evaluation.Expander`2.ItemExpander.MetadataMatchEvaluator.GetMetadataValueFromMatch(Match match)
           at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
           at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat)
           at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
           at Microsoft.Build.Evaluation.Expander`2.ItemExpander.IntrinsicItemFunctions`1.<ExpandQuotedExpressionFunction>d__3f.MoveNext()
           at Microsoft.Build.Evaluation.Expander`2.ItemExpander.<Transform>d__0`1.MoveNext()
           at Microsoft.Build.Evaluation.Expander`2.ItemExpander.<Transform>d__0`1.MoveNext()
           at Microsoft.Build.Evaluation.Expander`2.ItemExpander.ExpandSingleItemVectorExpressionIntoItems[S,T](Expander`2 expander, String expression, IItemProvider`1 items, IItemFactory`2 itemFactory, ExpanderOptions options, Boolean includeNullEntries, Boolean& isTransformExpression, IElementLocation elementLocation)
           at Microsoft.Build.Evaluation.Expander`2.ExpandSingleItemVectorExpressionIntoItems[T](String expression, IItemFactory`2 itemFactory, ExpanderOptions options, Boolean includeNullItems, Boolean& isTransformExpression, IElementLocation elementLocation)
           at Microsoft.Build.Evaluation.Evaluator`4.CreateItemsFromInclude(String rootDirectory, ProjectItemElement itemElement, IItemFactory`2 itemFactory, String unevaluatedIncludeEscaped, Expander`2 expander)
           at Microsoft.Build.Evaluation.Evaluator`4.EvaluateItemElement(Boolean itemGroupConditionResult, ProjectItemElement itemElement)
           at Microsoft.Build.Evaluation.Evaluator`4.EvaluateItemGroupElement(ProjectItemGroupElement itemGroupElement)
           at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
           at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, ProjectInstance projectInstanceIfAnyForDebuggerOnly)
           at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation)
           at Microsoft.Build.Evaluation.Project.CreateProjectInstance(ILoggingService loggingServiceForEvaluation, ProjectInstanceSettings settings)
           at Microsoft.Build.Evaluation.Project.CreateProjectInstance()
           at Microsoft.VisualStudio.Project.ProjectNode.SetConfiguration(String config) in d:\mpfproj10\Dev10\Src\CSharp\ProjectNode.cs:line 3577
           at Microsoft.VisualStudio.Project.ProjectConfig.GetMsBuildProperty(String propertyName, Boolean resetCache) in d:\mpfproj10\Dev10\Src\CSharp\ProjectConfig.cs:line 688
           at Microsoft.VisualStudio.Project.ProjectConfig.GetConfigurationProperty(String propertyName, Boolean resetCache) in d:\mpfproj10\Dev10\Src\CSharp\ProjectConfig.cs:line 164
           at Microsoft.VisualStudio.Project.ProjectNode.Microsoft.VisualStudio.Shell.Interop.IVsBuildPropertyStorage.GetPropertyValue(String propertyName, String configName, UInt32 storage, String& propertyValue) in d:\mpfproj10\Dev10\Src\CSharp\ProjectNode.cs:line 5740
      InnerException: 


    Sugia279 Don't try don't future

    Friday, July 27, 2012 8:58 AM

Answers

All replies