Search

C# compiler generates incorrect output file name by ap2834342

Closed

1
0
Sign in
to vote
Type: Bug
ID: 777351
Opened: 1/24/2013 12:41:42 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
According to documentation (http://msdn.microsoft.com/en-us/library/vstudio/ms247046(v=vs.110).aspx), the "Assembly name" project setting should control the name of the binary file that the C# compiler generates. However, in VS2012, this is not the case. Instead, the "Default namespace" setting controls this file name. Inspecting the command line with which the compiler is invoked reveals that it is given the wrong value of the /out parameter (http://msdn.microsoft.com/en-us/library/bw3t50f3.aspx).
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

1. Create new C# project from the "Windows Runtime Component" template.
2. Open project properties and select the Application tab.
3. Specify different values for "Assembly name" and "Default namespace".
4. Build the project and observe that the output file has the name of whatever was specified as "Default namespace".

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

The output file is named as whatever was specified as "Default namespace".

Expected results

The output file should be named as whatever was specified as "Assembly name".
File Attachments
0 attachments
Sign in to post a comment.
Posted by ap2834342 on 1/31/2013 at 4:06 AM
I understand the restriction, but the documentation for the project settings (see original post) clearly states that the "Assembly name" field controls the output file name, which for WinRT project type is not the case.

So either the documentation should be changed to describe the difference in project types, or (which is better in my view) the compilation process should be fixed to use the "Assembly name" field to set the assembly name, and enforce that "Default namespace" matches "Assembly name". The current way is confusing and illogical.
Posted by Microsoft on 1/25/2013 at 10:16 AM
Hello. The assembly name of a Windows Runtime Component must match the component's root namespace. For more information about how Windows Runtime Components are designed please see http://msdn.microsoft.com/en-us/magazine/jj651570.aspx
Posted by Microsoft on 1/24/2013 at 1:46 AM
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/24/2013 at 12:50 AM
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)
Sign in to post a workaround.