hellpie / hellpie.revittemplates Goto Github PK
View Code? Open in Web Editor NEWTemplates for creating Revit AddIn C# projects using dotnet new
License: Apache License 2.0
Templates for creating Revit AddIn C# projects using dotnet new
License: Apache License 2.0
After installing following the instructions on the main page. Using dotnet new revit-app
is resulting in an error:
An item with the same key has already been added. Key: -p:V
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at System.CommandLine.Parsing.StringExtensions.ValidTokens(Command command)
at System.CommandLine.Parsing.StringExtensions.Tokenize(IReadOnlyList1 args, CommandLineConfiguration configuration, Boolean inferRootCommand) at System.CommandLine.Parsing.Parser.Parse(IReadOnlyList
1 arguments, String rawInput)
at Microsoft.TemplateEngine.Cli.Commands.InstantiateCommand.ReparseForTemplate(InstantiateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, TemplateGroup templateGroup, CliTemplateInfo template, Boolean validateDefaultLanguage)
at Microsoft.TemplateEngine.Cli.Commands.InstantiateCommand.ReparseForTemplate(InstantiateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, TemplateGroup templateGroup, IEnumerable1 templatesToReparse, Boolean& languageOptionSpecified) at Microsoft.TemplateEngine.Cli.Commands.InstantiateCommand.GetTemplateCommand(InstantiateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, TemplateGroup templateGroup) at Microsoft.TemplateEngine.Cli.Commands.InstantiateCommand.HandleTemplateInstantationAsync(InstantiateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, TemplateGroup templateGroup, CancellationToken cancellationToken) at Microsoft.TemplateEngine.Cli.Commands.InstantiateCommand.ExecuteIntAsync(InstantiateCommandArgs instantiateArgs, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, InvocationContext context) at Microsoft.TemplateEngine.Cli.Commands.BaseCommand
1.InvokeAsync(InvocationContext context)
ciao Dario,
first, thanks a lot for this project, I'm just starting to develop Revit add-ins for my company and this will make my life easier...
Alas, I can't get if to work properly.
I tried to create a project with the following command:
dotnet new revit-app -A "SWSRevit" -Ad "SWS Revit Utils" -V "SWS" -Ve "SWS Engineering SpA" -Au "Andrea Ghensi" -F net4.7.2 -R 2020
The files are created correctly, but if I try to open the solution I get the message in the title.
In the solution explorer, I see that the virtual directories are created, but the projects are outside them.
This is the content of the .sln file:
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{DC1ECF0D-46E4-4010-819E-ABC03127BA12}"
ProjectSection(SolutionItems) = preProject
"Editor Config"=.editorconfig
"Git Ignores"=.gitignore
"Git Attributes=.gitattributes
"Read Me"=README.md
"License"=LICENSE
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{F85268E9-2361-4A69-952E-7EB85DBEA06E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwsRevit", "src\SwsRevit\SwsRevit.csproj", "{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwsRevit.Tests", "src\SwsRevit.Tests\SwsRevit.Tests.csproj", "{64136125-1CFE-4F7D-94D1-6986BB119AA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwsRevit.RevitTests", "src\SwsRevit.RevitTests\SwsRevit.RevitTests.csproj", "{78BE795D-9AE1-49E4-B66B-A10A09524965}"
EndProject
Global
GlobalSection(NestedProjects) = preSolution
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D} = {F85268E9-2361-4A69-952E-7EB85DBEA06E}
{64136125-1CFE-4F7D-94D1-6986BB119AA4} = {D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}
{78BE795D-9AE1-49E4-B66B-A10A09524965} = {D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Debug|x64.ActiveCfg = Debug|x64
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Debug|x64.Build.0 = Debug|x64
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Release|x64.ActiveCfg = Release|x64
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Release|x64.Build.0 = Release|x64
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Debug|x64.ActiveCfg = Debug|x64
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Debug|x64.Build.0 = Debug|x64
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Release|x64.ActiveCfg = Release|x64
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Release|x64.Build.0 = Release|x64
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Debug|x64.ActiveCfg = Debug|x64
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Debug|x64.Build.0 = Debug|x64
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Release|x64.ActiveCfg = Release|x64
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Release|x64.Build.0 = Release|x64
EndGlobalSection
EndGlobal
After rearranging the projects and folders, i end up with the following solution file:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{DC1ECF0D-46E4-4010-819E-ABC03127BA12}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{F85268E9-2361-4A69-952E-7EB85DBEA06E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwsRevit", "src\SwsRevit\SwsRevit.csproj", "{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwsRevit.Tests", "src\SwsRevit.Tests\SwsRevit.Tests.csproj", "{64136125-1CFE-4F7D-94D1-6986BB119AA4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwsRevit.RevitTests", "src\SwsRevit.RevitTests\SwsRevit.RevitTests.csproj", "{78BE795D-9AE1-49E4-B66B-A10A09524965}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D}.Release|Any CPU.Build.0 = Release|Any CPU
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64136125-1CFE-4F7D-94D1-6986BB119AA4}.Release|Any CPU.Build.0 = Release|Any CPU
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78BE795D-9AE1-49E4-B66B-A10A09524965}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F85268E9-2361-4A69-952E-7EB85DBEA06E} = {DC1ECF0D-46E4-4010-819E-ABC03127BA12}
{D3B890A6-1304-46FA-9A5F-CABCCC7C2A15} = {DC1ECF0D-46E4-4010-819E-ABC03127BA12}
{8AAF18A5-FF0B-431A-AA15-B5AFF21C968D} = {F85268E9-2361-4A69-952E-7EB85DBEA06E}
{64136125-1CFE-4F7D-94D1-6986BB119AA4} = {D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}
{78BE795D-9AE1-49E4-B66B-A10A09524965} = {D3B890A6-1304-46FA-9A5F-CABCCC7C2A15}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ECD9E7FC-E607-4F3B-93A5-911DA6B03536}
EndGlobalSection
EndGlobal
The solution files are gone, the GUID of the "real" projects changes, the sections SolutionProperties
and ExtensibilityGlobals
are added, and the target architecture becomes "Any CPU"...
I don't know anything about solutions and templates, so I can't be of much help fixing this... Any suggestion?
By the way, I also saw that the README.md
and LICENSE
files are not created.
Keep up the good work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.