Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpTrigger-CSharp-Isolated displays 'Restore Failed and Post Action Failed' after successful creation #1355

Open
oneolddev opened this issue Mar 25, 2023 · 0 comments

Comments

@oneolddev
Copy link

oneolddev commented Mar 25, 2023

This issue was uncovered originally in Azure Functions Core Tools when creating an isolated c# function. Please see the following: Azure/azure-functions-core-tools#3217 (comment).

Restoring C:\git\bug-free-sniffle\apitest\WeatherForecastFunction1.cs:
C:\git\bug-free-sniffle\apitest\WeatherForecastFunction1.cs(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. 
 Line 1, position 1.
Restore failed.
Post action failed.

It appears that it is the result of the template picking up the primaryOutputs path during Nuget restore according to lines 67-72 in the template.json.

        {
            "description": "Restore NuGet packages required by this project.",
            "manualInstructions": [],
            "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
            "continueOnError": true
        },

It should be picking up the project file. A quick scan of the other dotnet isolated templates show the same pattern of code.

The error messages appear to be superfluous when running from Azure Functions Core Tools but does raise concerns for newer users. According to Post Actions Registry, I believe it may be resovable by adding an args configuration.

@oneolddev oneolddev changed the title HttpTrigger-CSharp-Isolated Restore Failed and Post Action Failed HttpTrigger-CSharp-Isolated displays 'Restore Failed and Post Action Failed' after successful creation Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant