Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Invalid C# file created with new Library project #6640

Closed
mrward opened this issue Nov 21, 2018 · 6 comments
Closed

Invalid C# file created with new Library project #6640

mrward opened this issue Nov 21, 2018 · 6 comments

Comments

@mrward
Copy link
Member

mrward commented Nov 21, 2018

  • Affects master branch
  • Creating a new Library or PCL project results in a class containing the following code which does not compile:
using System;
namespace NewProject
{
    public class MyClass.cs
    {
        public MyClass.cs()
        {
        }
    }
}

There may be other affected projects.

I suspect this is related to the new file template change - #6590

VS bug #733182

@mrward
Copy link
Member Author

mrward commented Nov 27, 2018

The new file template fix has broken how ${Name} works in file templates. Before this change ${Name} was the name of the new file without any file extension. Now it includes the file extension entered by the user.

Another example of this problem is to create a new Empty C# class library and enter 'Test.cs' rather than just 'Test'. Entering 'Test.cs' and then the ${Name} parameter is replaced with 'Test.cs'.

@xamarin-release-manager
Copy link
Contributor

[sync] [VS-13] Comment by xamarinc

Fixed in version 7.8.0.1329 (master)

Pull Request #6676 merged by: Matt Ward
Author: mono
Commit: f6bba9e (mono/monodevelop)

@xamarin-release-manager
Copy link
Contributor

[sync] [VS-14] Comment by xamarinc

Fixed in version 7.8.0.1339 (release-7.8)

Pull Request #6676 merged by: Matt Ward
Author: mono
Commit: f6bba9e (mono/monodevelop)

@xamarin-release-manager
Copy link
Contributor

[sync] [VS-16] Comment by xamarinc

Fixed in version 8.0.0.832 (release-8.0)

Pull Request #6676 merged by: Matt Ward
Author: mono
Commit: f6bba9e (mono/monodevelop)

@xamarin-release-manager
Copy link
Contributor

[sync] [VS-17] Comment by xamarinc

Fixed in version 8.0.0.1738 (release-8.0)

Author: Matt Ward
Commit: 5b86ce0 (xamarin/monodevelop)

@xamarin-release-manager
Copy link
Contributor

[sync] [VS-19] Comment by xamarinc

Fixed in version 8.6.0.802 (master)

Pull Request #6676 merged by: Matt Ward
Author: mono
Commit: f6bba9e (xamarin/monodevelop)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants