-
Notifications
You must be signed in to change notification settings - Fork 83
Reinforced.Typings.settings.xml
Since Reinforced.Typings is not a framework itself but build process extension,
therefore settings file is basically piece of MSBuild script.
This file is being imported to your .csproj
during each build the same way
as Reinforced.Typings.targets that is located in its package /build
directory.
Reinforced.Typings has completely few build parameters that are listed below.
Default Reinforced.Typings.settings.xml file is located here
Keep in mind that you have to reload your project/solution after editing this file because MSBuild can not catch changes immediately.
- RtTargetFile
- RtConfigurationMethod
- RtDivideTypesAmongFiles
- RtTargetDirectory
- RtBypassTypeScriptCompilation
- RtDisable
- RtForceTargetFramework
This property points target file where to put generated sources.
It is not used if RtDivideTypesAmongFiles='true'
specified.
Important! Do not forget to include generated file to solution.
This property sets RT configuration method for fluent configuration.
If you don't want to use attributes for some reason then here you can
specify full-qualified configuration method name (including namespace,
type and method name, e.g. My.Assembly.Configuration.ConfigureTypings
)
of method that consumes Reinforced.Typings.Fluent.ConfigurationBuilder
type
and is void (returns nothing). This method will be executed to build
types exporting configuration in fluent manner.
Surely you can continue using attributes. Also fluent configuration methods
could not provide a way to configure some specific things (generics parameters
override and classes' TsBaseParam
). However in this case fluent configuration
would be preferred. It means that if member configuration is supplied both
in attributes and in fluent methods then configuration from fluent methods will
be used.
By default all of your typings will be located in single file specified by RtTargetFile
.
It may be heavy for large projects because you will get single large file containing significant
part of TS sources. It could lead to various problems (e.g. monstrous SCM merges).
So here we have RtDivideTypesAmongFiles parameter that will make Reinforced.Typings
generate TS sources in C#/Java/somewhat-OO-language-manner (class per file) when set to true.
Important! In case of using this setting, do not forget to add generated files to solution manually.
... and if you use RtDivideTypesAmongFiles
then please specify target directory
where to put all generated stuff. Reinforced.Typings will automatically create
directories structure according to used namespaces.
Note that in case of using RtDivideTypesAmongFiles
, RtTargetFile
parameter will
NOT be used anymore.
Disables typescript compilation in solution. Use it when your TypeScripts are broken and you need to rebuild project and then regenerate typings to fix it, but TypeScript compilation fails and failing project build. This option will temporary disable typescripts build.
Disables Reinforced.Typings generation on build. Use it when it is necessary to temporary disable typings generation.
Not always RT can correctly track what version of .NET framework you are using to pick valid CLI executable. If you experience some problems with it - uncomment and use this parameter to point RT the correct .NET version (net45
, net461
, netcoreapp1.0
, etc)