-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
FileNotFoundException for file: System.ComponentModel.TypeConverter.dll when used in TargetFramework .net7.0 with SelfContained set to true #706
Comments
I think it's related to :
And I wonder if this can be solved in System.Linq.Dynamic.Core Maybe you can create an issue for dotnet ? |
Hello, Running with :
The single executable found in the publish directory works as expected. I also tried running with:
and indeed the same issue appears (both in the debug and publish directory this time) @StefH Due to the above i don't think it's related to the trimming. However from you links I noticed the below:
From a quick look at the code it seems that Assembly.Location is used (eg
Not sure if it's related (since those are APIs incompatibilities with single file deployment) but i thought it's worth mentioning. I will try and do some more tests/reading and update accordingly. |
Hello,
Allow me to start by saying thank you for this library.
I believe I have found an issue when migrating some code from .net6.0 to .net7.0.
If this is an issue on my end (eg wrong version etc please feel free to correct me)
Description:
Changing TargetFramework from net6.0 to net7.0 with SelfContained set to true seems to cause an Unhandled exception. of type: System.IO.FileNotFoundException. Looking at the directory I can see that the file is there but has a different version (please see attached picture).
Exception message:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.ComponentModel.TypeConverter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.ComponentModel.TypeConverter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseComparisonOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLogicalAndOrOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIn() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAndOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseOrOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLambdaOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseNullCoalescingOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseConditionalOperator() at System.Linq.Dynamic.Core.Parser.ExpressionParser.Parse(Type resultType, Boolean createParameterCtor) at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(Type delegateType, ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values) at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values) at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda[T,TResult](ParsingConfig parsingConfig, Boolean createParameterCtor, String expression, Object[] values)
at Program.Main(String[] args) in ...
Sample code:
Sample code can be found here: https://dotnetfiddle.net/wnh2gk
csproj configuration:
The text was updated successfully, but these errors were encountered: