When updating the packages in a brand ne function app I notices that going from version 1.16.4 to version 1.17.0 of Microsoft.Azure.Functions.Worker.Sdk produces the following error
..\..\..\..\Program Files\dotnet\sdk\8.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets (266, 5): Assets file 'C:\Users\user\AppData\Local\NCrunch\21476\1\MyApp\obj\project.assets.json' doesn't have a target for 'net6.0'. Ensure that restore has run and that you have included 'net6.0' in the TargetFrameworks for your project.
I am on version 4.19.0.14 of nCrunch and version 17.9.1 of Visual Studio
Build/Test Issues
version 1.17.0 of Microsoft.Azure.Functions.Worker.Sdk makes ncrunch look for .net6
Started by Gamefaster on 6,635 views
Remco NCrunch Developer
#17031
25 Feb 2024 04:20 UTC
Hi, thanks for sharing this issue.
Does this project build without the error in Visual Studio?
Is this something you can reproduce with a sample project you can share with me?
Does this project build without the error in Visual Studio?
Is this something you can reproduce with a sample project you can share with me?
Yes it all builds and test run fine in Visual studio and Resharper.
If you
create a new function app with .net8.0 isolated long terms support
If you
create a new function app with .net8.0 isolated long terms support
- build the solution
- enable ncrunch - the project will build
- open manage packages for solution
- update all packages apart from Microsoft.Azure.Functions.Worker.Sdk
- ncrunch will still work and build the function
- now update Microsoft.Azure.Functions.Worker.Sdk and ncrunch fails to build the project before it even tries to run tests
Remco NCrunch Developer
#17035
27 Feb 2024 01:49 UTC
Would you be interested in trying the build below to see if this solves the issue for you?
NCrunch_Console_4.20.0.2.msi
NCrunch_Console_4.20.0.2.zip
NCrunch_GridNodeServer_4.20.0.2.msi
NCrunch_GridNodeServer_4.20.0.2.zip
NCrunch_LicenseServer_4.20.0.2.zip
NCrunch_VS2010_4.20.0.2.msi
NCrunch_VS2010_4.20.0.2.zip
NCrunch_VS2012_4.20.0.2.msi
NCrunch_VS2012_4.20.0.2.zip
NCrunch_VS2013_4.20.0.2.msi
NCrunch_VS2013_4.20.0.2.zip
NCrunch_VS2015_4.20.0.2.msi
NCrunch_VS2015_4.20.0.2.msi.7z
NCrunch_VS2015_4.20.0.2.zip
NCrunch_VS2017_4.20.0.2.msi
NCrunch_VS2017_4.20.0.2.msi.7z
NCrunch_VS2017_4.20.0.2.zip
NCrunch_VS2019_4.20.0.2.msi
NCrunch_VS2019_4.20.0.2.msi.7z
NCrunch_VS2019_4.20.0.2.zip
NCrunch_VS2022_4.20.0.2.msi
NCrunch_VS2022_4.20.0.2.msi.7z
NCrunch_VS2022_4.20.0.2.zip
NCrunch_Console_4.20.0.2.msi
NCrunch_Console_4.20.0.2.zip
NCrunch_GridNodeServer_4.20.0.2.msi
NCrunch_GridNodeServer_4.20.0.2.zip
NCrunch_LicenseServer_4.20.0.2.zip
NCrunch_VS2010_4.20.0.2.msi
NCrunch_VS2010_4.20.0.2.zip
NCrunch_VS2012_4.20.0.2.msi
NCrunch_VS2012_4.20.0.2.zip
NCrunch_VS2013_4.20.0.2.msi
NCrunch_VS2013_4.20.0.2.zip
NCrunch_VS2015_4.20.0.2.msi
NCrunch_VS2015_4.20.0.2.msi.7z
NCrunch_VS2015_4.20.0.2.zip
NCrunch_VS2017_4.20.0.2.msi
NCrunch_VS2017_4.20.0.2.msi.7z
NCrunch_VS2017_4.20.0.2.zip
NCrunch_VS2019_4.20.0.2.msi
NCrunch_VS2019_4.20.0.2.msi.7z
NCrunch_VS2019_4.20.0.2.zip
NCrunch_VS2022_4.20.0.2.msi
NCrunch_VS2022_4.20.0.2.msi.7z
NCrunch_VS2022_4.20.0.2.zip
Unfortunately that Didn't work and ended up breaking ncrunch across the board so even a new project didn't build.
This is the trace output
System.InvalidOperationException: No process is associated with this object.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_Id()
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(ExternalProcess )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters , Boolean )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..()
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridClientDescription , DotNetCoreSdkVersion )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, IDEVersion ideVersion, BuildEngineId buildEngineId, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFrameworkForMsbuild, String visibleTargetFramework)
This is the trace output
System.InvalidOperationException: No process is associated with this object.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_Id()
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(ExternalProcess )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters , Boolean )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..()
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridClientDescription , DotNetCoreSdkVersion )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, IDEVersion ideVersion, BuildEngineId buildEngineId, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFrameworkForMsbuild, String visibleTargetFramework)
Remco NCrunch Developer
#17037
27 Feb 2024 10:32 UTC
Sorry to hear that. Could you submit an NCrunch bug report after you've had this happen to you? I'm hopeful the log will contain the reason for the process suddenly disappearing. Then windows event viewer may also have some information here. According to this error, the worker process simply disappeared before it was fully tethered.
Edit: Also check the logs from any virus scanner or security software you have installed. If something on your machine took down the process, it can often cause this error.
Edit: Also check the logs from any virus scanner or security software you have installed. If something on your machine took down the process, it can often cause this error.
Edited 27 Feb 2024 10:35 UTC
Sorry did you want a bug reported with the updated version you gave me or the ga version that is on the site?
Remco NCrunch Developer
#17039
28 Feb 2024 11:18 UTC
Gamefaster wrote:Sorry did you want a bug reported with the updated version you gave me or the ga version that is on the site?
The updated version.
The version I've posted above contains a fix for the Azure functions issue you reported. This was essentially being caused by a nested build inside the MS toolkit, which was being affected by a build property we needed to override to set the project.assets.json file when building the functions project. As far as I can tell, the fix resolves the issue. I'm not sure why the task runners are failing to run on your system with this version, but right now it's the problem we need to solve. The Azure functions issue should be gone now.
Damn it I just posted a bug fix on the GA release... Let me update and do it agqain
Remco NCrunch Developer
#17041
28 Feb 2024 12:19 UTC
Gamefaster wrote:Damn it I just posted a bug fix on the GA release... Let me update and do it agqain
If you can, when updating, could you try the removal and reinstallation fix, making sure to reinstall using the MSI above? I think this would be worth trying as there is a high chance that this error is caused by an install state issue.
Just found that the machine that is managed by my organisation is now blocking that version of ncrunch which caused the "No process is associated with this object" issue
Blocked By: Attack surface reduction
Rule: Block executable files from running unless they meet a prevalence, age, or trusted list criteria
Affected Items: C:\Users\JayFreeman\AppData\Local\NCrunch\BuildSystem\10328\VS2022\nCrunch.BuildHost462.x64.exe
When I tried the new version on my personal machine it works fine again.
I think we can resolve this as fixed and I will try and get the organisation I am at to unblock ncrunch.
Thanks for your help
Blocked By: Attack surface reduction
Rule: Block executable files from running unless they meet a prevalence, age, or trusted list criteria
Affected Items: C:\Users\JayFreeman\AppData\Local\NCrunch\BuildSystem\10328\VS2022\nCrunch.BuildHost462.x64.exe
When I tried the new version on my personal machine it works fine again.
I think we can resolve this as fixed and I will try and get the organisation I am at to unblock ncrunch.
Thanks for your help
Remco NCrunch Developer
#17043
28 Feb 2024 12:52 UTC
Gamefaster wrote:Just found that the machine that is managed by my organisation is now blocking that version of ncrunch which caused the "No process is associated with this object" issue
Thanks! I was thinking it would be something like that. There isn't much difference between these builds, and the one posted above won't have been downloaded by many users yet .. so many of the more paranoid scanners would likely flag it.
The Azure function fix will be rolled into the V5 release that will be going out next week. I expect V5 will get quite a lot of attention quickly, which will help with the reputation, and should allow you to get past the scanner in short order.
Fails to build here with NCrunch 5.1 and Microsoft.Azure.Functions.Worker.Sdk 1.17.2. It builds fine if I drop the version of the Functions SDK to 1.16.4
It uses net6 and a temporary project because it has to build a wrapper for the Functions runtime to know what Functions are available in the "Isolated" model. I know one of the big changes between 1.16 and 1.17 was that it has to specifically ignore some ReadyToRun properties that are passed in to the "parent" project, and looking at the error message it could possibly be related to that
C:\Users\MatthewSteeples\AppData\Local\Temp\tdmo5dii.0kt\WorkerExtensions.csproj: The target framework 'net8.0' must be 'net6.0'. Verify if target framework has been overridden by a global property.It uses net6 and a temporary project because it has to build a wrapper for the Functions runtime to know what Functions are available in the "Isolated" model. I know one of the big changes between 1.16 and 1.17 was that it has to specifically ignore some ReadyToRun properties that are passed in to the "parent" project, and looking at the error message it could possibly be related to that
Remco NCrunch Developer
#17086
05 Mar 2024 23:48 UTC
MatthewSteeples wrote:
It uses net6 and a temporary project because it has to build a wrapper for the Functions runtime to know what Functions are available in the "Isolated" model. I know one of the big changes between 1.16 and 1.17 was that it has to specifically ignore some ReadyToRun properties that are passed in to the "parent" project, and looking at the error message it could possibly be related to that
Thanks for sharing this. Yes, I think we have something bleeding through into nested build for the temporary project. The fix discussed above worked for 1.17, but 1.17.2 seems to have broken it further. I'm able to reproduce this on my side and will let you know as soon as I have a solution available.
Remco NCrunch Developer
#17088
06 Mar 2024 12:09 UTC
Would you be interested in trying the build below? I'm hoping this will work better with all versions of the Azure function SDK.
NCrunch_Console_5.2.0.1.msi
NCrunch_Console_5.2.0.1.zip
NCrunch_GridNodeServer_5.2.0.1.msi
NCrunch_GridNodeServer_5.2.0.1.zip
NCrunch_LicenseServer_5.2.0.1.zip
NCrunch_Rider_5.2.0.1.7z
NCrunch_Rider_5.2.0.1.zip
NCrunch_VS2010_5.2.0.1.msi
NCrunch_VS2010_5.2.0.1.zip
NCrunch_VS2012_5.2.0.1.msi
NCrunch_VS2012_5.2.0.1.zip
NCrunch_VS2013_5.2.0.1.msi
NCrunch_VS2013_5.2.0.1.zip
NCrunch_VS2015_5.2.0.1.msi
NCrunch_VS2015_5.2.0.1.msi.7z
NCrunch_VS2015_5.2.0.1.zip
NCrunch_VS2017_5.2.0.1.msi
NCrunch_VS2017_5.2.0.1.msi.7z
NCrunch_VS2017_5.2.0.1.zip
NCrunch_VS2019_5.2.0.1.msi
NCrunch_VS2019_5.2.0.1.msi.7z
NCrunch_VS2019_5.2.0.1.zip
NCrunch_VS2022_5.2.0.1.msi
NCrunch_VS2022_5.2.0.1.msi.7z
NCrunch_VS2022_5.2.0.1.zip
NCrunch_Console_5.2.0.1.msi
NCrunch_Console_5.2.0.1.zip
NCrunch_GridNodeServer_5.2.0.1.msi
NCrunch_GridNodeServer_5.2.0.1.zip
NCrunch_LicenseServer_5.2.0.1.zip
NCrunch_Rider_5.2.0.1.7z
NCrunch_Rider_5.2.0.1.zip
NCrunch_VS2010_5.2.0.1.msi
NCrunch_VS2010_5.2.0.1.zip
NCrunch_VS2012_5.2.0.1.msi
NCrunch_VS2012_5.2.0.1.zip
NCrunch_VS2013_5.2.0.1.msi
NCrunch_VS2013_5.2.0.1.zip
NCrunch_VS2015_5.2.0.1.msi
NCrunch_VS2015_5.2.0.1.msi.7z
NCrunch_VS2015_5.2.0.1.zip
NCrunch_VS2017_5.2.0.1.msi
NCrunch_VS2017_5.2.0.1.msi.7z
NCrunch_VS2017_5.2.0.1.zip
NCrunch_VS2019_5.2.0.1.msi
NCrunch_VS2019_5.2.0.1.msi.7z
NCrunch_VS2019_5.2.0.1.zip
NCrunch_VS2022_5.2.0.1.msi
NCrunch_VS2022_5.2.0.1.msi.7z
NCrunch_VS2022_5.2.0.1.zip
Edited 06 Mar 2024 12:10 UTC
I'm still seeing the same issue. With NCrunch 5.9.0.1 and Microsoft.Azure.Functions.Worker.Sdk > 1.16.4.
Edited 01 Aug 2024 04:05 UTC
Remco NCrunch Developer
#17522
01 Aug 2024 03:51 UTC
mattyboy wrote:I'm still seeing the same issue. With NCrunch 5.9.0.1.
They changed it again. Please see here for the latest fix build.
Post a reply
Log in to reply.