NullReferenceException when add an ItemGroup to Another - by baccali

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 775889 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/5/2013 5:00:18 PM
Access Restriction Public

Description

When adding an ItemGroup to Another, the load of the Project fail with an MBox saying that an 'Object reference not set to an instance of an object'.

The Project is a Cpp UnitTest project and builds just fine in msbuild. Am I doing something wrong?

Thanks.

Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:31 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 1/11/2013 at 1:41 PM
Hello Baccali, Thank you for openning a connect report with us. We have identified the issue and are looking for a solution. We will fix the project loading in a future release. Despite the exception, this is not a support scenerio.
The reason is that itemgroups can have multiple files. For ClCompile to import @(Foo), ClCompile will see @(Foo) as a list of files (a.cpp;b.cpp;c.cpp). This is fine for just building. The issue arrise when the IDE tries to modify the item. Suppose you try to modify a.cpp to have a different Predefinition. The system can't break up @(Foo) into smaller pieces. Further more @(Foo) may not even been set in the project file (imported from another file). Due to this complexity, it is not support at this time.
Thanks
Felix Huang
Posted by Microsoft on 1/6/2013 at 9:44 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 1/5/2013 at 5:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)