Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Building precompiled C# Azure Function fails
SteveC
#1 Posted : Friday, August 18, 2017 11:06:06 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 10
Location: United Kingdom

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
I've got a solution in VS 2017 Update 3, which consists of a precompiled C# Function App, plus a plain C# project, and two MsTest projects (each corresponding to the real code)

The solution builds fine in VS 2017 Update 3 RTM ... previously I was working on it in the 2017 preview

But NCrunch won't build the precompiled C# Function App ?

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\..\..\..\Users\Stephen Culshaw\.nuget\packages\microsoft.net.sdk.functions\1.0.0-alpha3\build\netstandard1.0\Microsoft.NET.Sdk.Functions.targets (44, 5):
Could not load file or assembly 'Microsoft.Azure.WebJobs, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Checked in my \.nuget\packages\ and I've 2..0.0 and 2.1.0-beta1

Checked in the csproj for the function app and I can see the packages ...

<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="2.1.0-beta1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="2.1.0-beta1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DocumentDB" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="2.1.0-beta1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.0-alpha3" />
</ItemGroup>

Checked and those versions are all in my \.nuget\packages\

Updated the Function App project to reference the released 1.0.0 NuGet package ...
Solution still builds fine in VS, but slightly different error from NCrunch ...

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\..\..\..\Users\Stephen Culshaw\.nuget\packages\microsoft.net.sdk.functions\1.0.0\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets (31, 5):
Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.


Reached the limit of my minimal understanding of MsBuild ... can anyone help?

Remco
#2 Posted : Friday, August 18, 2017 12:00:27 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,864

Thanks: 648 times
Was thanked: 752 time(s) in 717 post(s)
Hi, thanks for sharing this problem.

Unfortunately, Azure based projects are not supported by NCrunch. For this reason there has been no QA performed on azure projects, or features implemented in the engine to get these to build or run tests.

Have you tried setting the engine in compatibility mode?
fysiofriends
#3 Posted : Saturday, September 09, 2017 11:40:36 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/25/2017(UTC)
Posts: 3
Location: Netherlands

Was thanked: 1 time(s) in 1 post(s)
FYI: I had the same problem and settings the engine in compatibility mode didn't help
SteveC
#4 Posted : Saturday, September 09, 2017 2:17:22 PM(UTC)
Rank: Member

Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 10
Location: United Kingdom

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Yeah, I also tried the compat mode with no joy :-(

What I find baffling (and annoying) is the solution used to work when I was working in VS 2017 Preview and the Function SDK preview ...

BUT since I updated to the RTM of VS 2017 and/or Functions SDK "something" has broken :-(

@Remco ... any plans to offer support of the various Azure projects, especially the App Service ones, i.e. Web / API / Function App ?
Remco
#5 Posted : Saturday, September 09, 2017 11:38:37 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,864

Thanks: 648 times
Was thanked: 752 time(s) in 717 post(s)
SteveC;11180 wrote:

@Remco ... any plans to offer support of the various Azure projects, especially the App Service ones, i.e. Web / API / Function App ?


Sorry :( No short term plans for this. I'm currently overloaded trying to keep up with platform level changes and don't have the capacity to expand the range of support options for project types like this one. It might be possible in future as the business grows.
SteveC
#6 Posted : Sunday, September 10, 2017 9:10:22 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 10
Location: United Kingdom

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
:-(

Ah well, I'll keep the fingers crossed :-)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.045 seconds.