amaletski.nanoFramework.MSBuildTasks
0.1.4
dotnet add package amaletski.nanoFramework.MSBuildTasks --version 0.1.4
NuGet\Install-Package amaletski.nanoFramework.MSBuildTasks -Version 0.1.4
<PackageReference Include="amaletski.nanoFramework.MSBuildTasks" Version="0.1.4" />
paket add amaletski.nanoFramework.MSBuildTasks --version 0.1.4
#r "nuget: amaletski.nanoFramework.MSBuildTasks, 0.1.4"
// Install amaletski.nanoFramework.MSBuildTasks as a Cake Addin #addin nuget:?package=amaletski.nanoFramework.MSBuildTasks&version=0.1.4 // Install amaletski.nanoFramework.MSBuildTasks as a Cake Tool #tool nuget:?package=amaletski.nanoFramework.MSBuildTasks&version=0.1.4
nanoFramework.MSBuildTasks
Package Installation (Visual Studio)
- Install the NuGet package as usual.
- Unload the project:
- Right-click the project in the "Solution Explorer" window.
- Select "Unload Project".
- Open the project file:
- Right-click the unloaded project in the "Solution Explorer" window.
- Select "Edit Project File".
- Add
props
andtargets
imports in thenfproj
:- Add the following
Import
after the lastprops
Import
node (somewhere at the top of the project node).
Note: Replace [PackageVersion] with the appropriate version.<Import Project="..\packages\amaletski.nanoFramework.MSBuildTasks.[PackageVersion]\build\netnano1.0\amaletski.nanoFramework.MSBuildTasks.props" />
- Add the following
Import
after the lasttargets
Import
node (somewhere at the bottom of the project node).
Note: Replace [PackageVersion] with the appropriate version.<Import Project="..\packages\amaletski.nanoFramework.MSBuildTasks.[PackageVersion]\build\netnano1.0\amaletski.nanoFramework.MSBuildTasks.targets" />
- Press
Ctrl+S
to save changes.
- Add the following
- Reload the project:
- Right click the unloaded project in the "Solution Explorer" window.
- Select "Reload Project".
[!IMPORTANT] Make sure to update the imports after updating the NuGet package version.
<details> <summary>Why should I do this?</summary>
Without these imports, the package will not work. There are likely some issues with the nanoFramework project system because, according to this Microsoft Docs page, these imports should be managed automatically. </details>
Use Cases
Resource Embedding
To use this feature, nfproj
should be updated.
Files that should be included in the embedded resources
can be configured through user-defined ResourcesSource
elements. All files that match will be embedded as <b>binary</b> resources.
[!NOTE] If there are no
ResourcesSource
elements in thenfproj
, theresx
file will not be generated, andresources
will not be embedded.
[!TIP] Multiple
ResourcesSource
elements can be specified in the samenfproj
. All matching files will be embedded into the sameresources
file.
Attributes
Attribute | Required | Description |
---|---|---|
Include |
Required | Relative or absolute path to the folder with files to include |
RegexFilter |
Optional | Regular expression to filter files within the Include directory. |
SearchPattern |
Optional | Search pattern to filter files within the Include directory. |
[!WARNING] Do not specify
RegexFilter
andSearchPattern
in the sameResourcesSource
as it will cause a validation error.
Optionally, the name of the generated resx
file can be overridden through the GeneratedResxFileName
custom property. Default value: Resources.resx
.
[!NOTE] The generated
resx
file will be deleted on project/solution clean.
Examples:
<PropertyGroup>
<GeneratedResxFileName>CustomFileName.resx</GeneratedResxFileName>
</PropertyGroup>
<ItemGroup>
<ResourcesSource Include="Settings">
<SearchPattern>*.json</SearchPattern>
</ResourcesSource>
<ResourcesSource Include="..\spa\dist" />
</ItemGroup>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NETnanoFramework | netnano1.0 is compatible. |
-
.NETFramework 4.7.2
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.