Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / desktop / XAML

Exception Has Been Thrown by the Target of an Invocation using Visual Studio and TFS

5.00/5 (1 vote)
27 Jan 2015CPOL 11K  
Exception has been thrown by the target of an invocation using Visual Studio and TFS

Introduction

This kind of issue can also happens on improper check-in by others.

Solution

I had this issue after getting the latest from TFS. It turns out in my case, it happens if other colleagues don't merge or resolve your code properly.

I checked in an XAML and its .cs file, but my colleague did not resolve my changes and checked-in his changes.

In my case, the solution was to copy Itemgroup from history and place it in the latest sln file.

XML
<ItemGroup>
    <EmbeddedResource Include="Pages\Job\AssetJobsList.xaml">
        <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
        <SubType>Designer</SubType>
    </EmbeddedResource>
</ItemGroup>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)