-
Notifications
You must be signed in to change notification settings - Fork 27
Troubleshooting
The extension contains 2 individual tasks:
- The
Assembly Info (.Net Framework)
task used to set assembly info metadata for*.cs
and*.vb
files. - The
Assembly Info (.Net Core & .Net Standard)
task used to set assembly info metadata for*.csproj
files.
Please ensuring you are using the correct task to target your project framework. Using the incorrect task will fail to replace or add the assembly metadata attributes.
If any *.csproj
file targeting the .Net Framework is detected with the Assembly Info (.Net Core & .Net Standard)
task then a warning will be displayed in your build output:
2019-02-05T14:05:40.0303455Z Setting .Net Core / .Net Standard assembly info...
2019-02-05T14:05:40.0591735Z Processing: /home/vsts/work/1/s/tests/projects/CSharpLib/CSharpLib.csproj
2019-02-05T14:05:40.0657281Z Detected character encoding: utf-8
2019-02-05T14:05:40.1058819Z ##[warning] Project is not targeting .Net Core or .Net Standard, moving to next file.
If the desired results are not being achieved then inspect the task output from your build. If the task was successful you will see a build output similar to the following:
However if your build output is similar to this then something is wrong:
2019-01-25T10:44:02.6912673Z Setting .Net Core assembly info...
2019-01-25T10:44:02.7393806Z Processing: /home/vsts/work/1/s/tests/projects/NetCoreLib/NetCoreLib.csproj
2019-01-25T10:44:02.7480553Z Detected character encoding: utf-8
2019-01-25T10:44:02.7734456Z Verify character encoding: utf-8
2019-01-25T10:44:02.7734528Z
2019-01-25T10:44:02.7866677Z Complete.
✔️ First check to ensure Insert attributes: true
. This will ensure any missing attributes are added to the file.
✔️ Check to ensure the correct task has been used and the Source files
have been specified correctly.
If the task is failing to add or replace any of the attributes ensure the detected and verified file encoding are identical:
2019-01-25T23:14:57.8579220Z Detected file encoding: utf-8
2019-01-25T23:14:57.9191174Z Verify file encoding: iso-8859-1
In some cases where the detected file encoding is utf
and the verified file encoding is different you will need to enable the option Write unicode BOM: true
. This will ensure a byte order mark (BOM) is written to the file which will instruct the file system it is indeed a utf
file.