-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting the unescaped source name inside files. #1193
Comments
Hi @normj - I believe the resolution of issue #1168 (comment) should work for your situation too - depending on the version of the dotnet cli (or VS) you're using... there's some discussion in that issue about which versions it'll work in. If that's not sufficient, let me know. |
If I understand correctly I would have to maintain 2 different versions of the templates. One for the current 1.0.4 version as they are now and another for the next version of the CLI with different sourceNames. If I just switched to this new approach that would break everybody who is still using the current CLI. Also is there a way in the NuGet package for the template to say which version of the CLI the templates are compatible for? |
Any update to this? |
Unfortunately there's not an update we can give that will get things working across the board if you still need to support the 1.0.x CLI as we haven't been able to get on any of the servicing trains with an update to the engine that would make the experience uniform. If the 1.0.x CLI is no longer a requirement, the 1.1.x and 2.x CLIs the example here should get things working. In the config, you'll see that the
An aside - in Template1.csproj, I've also included the logic for conditionally including As far as referring to a particular minimum version of the engine goes, here's an example of that. Unfortunately, it seems that that version number is always 1.0.0.0 at the moment. @seancpeters we'll either need to convert this over in a compatible way to be able to use |
|
If I understood correctly, the issue is now fixed for CLI versions starting 1.1.x. |
I have an issue I'm tracking down with our AWS templates when a user is using a template from a directory with a '-' in it. aws/aws-lambda-dotnet#87
What looks like is happening is all the file and directory names that reference the
sourceName
get the value with '-' but thesourceName
references inside file are getting an escaped value which replaces the '-' with an '_'. I assume this is done because in C# '-' is an invalid character for identifiers like namespaces and class names.I also need access to the unescaped value for setting up things like project references. In my templates I have a source project and a test project. I reference the
sourceName
in the csproj for the test project to add the project reference to the source project. The path to the source project is incorrect when there is a dash because on disk the directory contains a '-' but what gets put in the test projects csproj is a '_'.Is there any way to access the unescaped 'sourceName' when referencing the 'sourceName' in a file?
The text was updated successfully, but these errors were encountered: