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

Assembly.Location not returning correct value #1073

Closed
brettsam opened this Issue Dec 22, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@brettsam
Member

brettsam commented Dec 22, 2016

A recent update changed the way that private assemblies were being loaded from the bin directory. A side effect of this is that now calls to Assembly.Location return an empty string. Some libraries depend on this, and as such, aren't functioning properly.

While we work on a fix, there are two workarounds:

Workaround 1 -- Move the assembly to a different folder:

  1. Move your assembly to a folder named something other than bin. For example, sharedfolder.
  2. Update your references to match the relocated assemblies. For example #r ..\sharedfolder\assembly.dll
  3. Restart the site by clicking Function app settings, then Go to App Service Settings, and clicking Restart at the top of the opened portal blade.

Workaround 2 -- Revert to the previous Functions version:

  1. In the portal, click Function app settings
  2. Click Configure app settings
  3. In the App settings section of the new portal blade, set FUNCTIONS_EXTENSION_VERSION to 1.0.10661 and click Save. This will restart your site and configure it to use the previous version. Note that you will need to reset this value to ~1 in order to receive future updates.

@fabiocav fabiocav self-assigned this Dec 22, 2016

guitarrapc added a commit to guitarrapc/AzureFunctionsIntroduction that referenced this issue Dec 27, 2016

@guitarrapc

This comment has been minimized.

Show comment
Hide comment
@guitarrapc

guitarrapc Dec 27, 2016

It also happen on me 6days ago and Workaround 2 completely avoid issue, thank you very much for share!

My situation was here.

  1. Using Roslyn Compiler service inside Azure Functions to evaluate C# Code requested from Slack.
  2. Issue happen when loading Assembly info at https://github.com/guitarrapc/AzureFunctionsIntroduction/blob/master/CSharpScripting.csx#L39

Issue fix at my environment with following commit.

guitarrapc/AzureFunctionsIntroduction#3

Appreciate for advice! Great help.

guitarrapc commented Dec 27, 2016

It also happen on me 6days ago and Workaround 2 completely avoid issue, thank you very much for share!

My situation was here.

  1. Using Roslyn Compiler service inside Azure Functions to evaluate C# Code requested from Slack.
  2. Issue happen when loading Assembly info at https://github.com/guitarrapc/AzureFunctionsIntroduction/blob/master/CSharpScripting.csx#L39

Issue fix at my environment with following commit.

guitarrapc/AzureFunctionsIntroduction#3

Appreciate for advice! Great help.

@fabiocav

This comment has been minimized.

Show comment
Hide comment
@fabiocav

fabiocav Dec 27, 2016

Member

@guitarrapc thank you for sharing the details! I'm glad the workaround addressed the issue without requiring you to target the previous version.

As mentioned on the Twitter conversation, we'll be addressing this issue. Apologies for the inconvenience.

Member

fabiocav commented Dec 27, 2016

@guitarrapc thank you for sharing the details! I'm glad the workaround addressed the issue without requiring you to target the previous version.

As mentioned on the Twitter conversation, we'll be addressing this issue. Apologies for the inconvenience.

@christopheranderson christopheranderson added this to the Next - Triaged milestone Jan 9, 2017

@fabiocav

This comment has been minimized.

Show comment
Hide comment
@fabiocav

fabiocav May 31, 2017

Member

For private assemblies, this behavior will be kept and won't change on the current major version. Closing.

Member

fabiocav commented May 31, 2017

For private assemblies, this behavior will be kept and won't change on the current major version. Closing.

@fabiocav fabiocav closed this May 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment