-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enable dnn manifest tokens #16
Comments
NuGet can actually replace some parameters in the manifest file when it's installed, based upon some project properties. I'm going to experiment with this to see if the some values in the manifest can be set with sensible default values at install time. |
…that nuget will replace when the manifest file is installed to the project by NuGet.
That would be cool! |
I have implemented this feature "in part" by using NuGet to replace tokens in the manifest with project values when the manifest is added, but that's not the full feature I was going for, as if you then change your project or assembly name, this won't update anything in the manifest, you would have to remember to manually update your manifest as the tokens are only replaced once at package install time. I'm happy to leave things like this for now, if there is more demand for this feature in future, can come back to it at that point. |
I think this is a great start! |
I do this in my projects with a MSBUILD trick. Here is what I setup in my project files after I install DNNPackager:
The BUILD_NUMBER field defaults to a hard coded version for the manifest file, but if built through Team City it will be the build number field. Maybe this will help you with making it more generic and integrate into your package. |
Wow thank you for sharing this. It's pretty cool that you found a way to do this in way that integrates nicely with |
Blocked by Move msbuild xml logic into a C# Custom Build Task class and Create Unit Tests #15Done.Rather than the developer having to explicitly replace some values (in square brackets) in the DNN manifest file, I could automatically set them using properties of the project. For example, rather than the following manifest file:
It could instead contain variables that I will automatically substitute with appropriate values:
These values will come from the corresponding project properties
One important thing to note will be that when you use a variable in the manifest for the version number (like below), then by default it will be set according to an MsBuild property named $(manifestVersionNumber) which by default, will be set from the AssemblyInfoVersion (Major.Minor.Build). You could optionally override this variable with your own version number - i.e perhaps a version number based on the Team City build counter etc.
The text was updated successfully, but these errors were encountered: