aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Updating primaryOutputs in template.json to remove leading ./

Open sayedihashimi opened this issue 3 years ago • 8 comments

Updating primaryOutputs in template.json to remove leading ./ from the primaryOutputs. There is a bug in the TemplateEngine that this is working around. When there is a leading ./ in primaryOutputs this prevents the template from appearing in Visual Studio, see this blog post https://devblogs.microsoft.com/dotnet/net-cli-templates-in-visual-studio/

FYI there will be a few other things that you are likely to want to update to get the templates to behave well in Visual Studio. For example, you'll probably want to add an icon for each template. If you can start to get those icons put together, I can help you get the code changes in place. Fell free to ping me on twitter, when you are ready https://twitter.com/sayedihashimi

sayedihashimi avatar Oct 13 '20 14:10 sayedihashimi

Thanks for taking the time to engage with us on our blueprints. I think the support in VS to show CLI templates is great but I'm trying to figure out how it will work with these templates because we already expose them through Visual Studio through our own Project Wizard.

image

Now I think we will get them twice which is going to confuse users. Again as much as I like the feature I'm not sure it will be a better experience then our existing VS tailored experience. Will there be an option for templates that already have a VS experience to turn off the CLI template integration for just our package?

normj avatar Oct 14 '20 22:10 normj

@normj thanks for the info. I didn't realize that you already had an experience for this. I'm assuming that this come in through a VS Extension. When a user installs via dotnet new --install, would you prefer that we don't show those templates directly in the New Project Dialog? If so, I'll work on a sample of how to do that and share it with you here. Same question for Visual Studio for Mac. I'm not sure if you have an extension there, so I could envision you might want to show them directly in the New Project Dialog in VS for Mac but not in Visual Studio. If you let me know what you prefer, I'll get you a sample. I want to make sure that we have a good experience for these templates.

cc @jmatthiesen (PM working in Visual Studio for Mac)

sayedihashimi avatar Oct 14 '20 22:10 sayedihashimi

You are correct, I would like them to not show up in VS but I would like them to show up in VS for Mac. The templates are exposed via our AWS Toolkit for Visual Studio

normj avatar Oct 14 '20 23:10 normj

Ok, got it. I will work on a PR that has those changes. We may still need this PR to ensure that it works in VS for Mac. Is it possible to create the template .nupkg from this PR to see if it helps?

sayedihashimi avatar Oct 14 '20 23:10 sayedihashimi

If you run the following command at the root of the repo it will write nupkg to the Deployment/nuget-packages directory. Don't worry about the 3.9.0 version. That is for anybody that still needs templates targeting .NET Core 2.1.

dotnet msbuild .\buildtools\build.proj  /t:package-blueprints

normj avatar Oct 14 '20 23:10 normj

Thanks. @jmatthiesen when you get a chance (and when the build is ready) can you try the AWS templates in VSM? If the project(s) are created, but not added to the solution, try building the .nupkg with changes from this PR and try again.

sayedihashimi avatar Oct 15 '20 00:10 sayedihashimi

Thanks for copying me in @sayedihashimi! @normj I'm trying to build the package using the build.proj you mention above, but it's not working on my Mac. Should I be able to build it from a Mac?

jmatthiesen avatar Oct 21 '20 19:10 jmatthiesen

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

github-actions[bot] avatar Oct 22 '21 00:10 github-actions[bot]

@sayedihashimi @jmatthiesen @normj Good afternoon. I was going through the open PR list and stumbled across this PR. Please review if this PR is still valid (I see it referencing .NET Core 2.1 templates) or if it should be closed.

Thanks, Ashish

ashishdhingra avatar Apr 19 '23 21:04 ashishdhingra