I've got a solution containing 6 or so projects which all build fine when in debug configuration. However, when I try and build it in release mode, I get 53 errors all complaining that DLL's can't be found. This is just a few of the messages:
Errors:
Warnings
How do I start to fix this?
The debug paths have been left as they are, but each project release path has been set to build into a specific folder.
EDIT: This is what my Error List looks like. All of the errors appear to be related to third party packages.
To fix a broken project reference by correcting the reference path. In Solution Explorer, right-click your project node, and then select Properties. The Project Designer appears. If you're using Visual Basic, select the References page, and then click the Reference Paths button.
In Solution Explorer, right-click the project and choose Properties. In the Configuration list, choose Debug or Release. In the side pane, choose Linker > Debugging, then select options for Generate Debug Info. In most C++ projects, the default value is Generate Debug Information (/DEBUG).
To compile in release mode, we just need to add the --release flag to the flutter run command and have a physical device connected.
I had a similar problem. Project builds fine in Debug mode but in Release mode some references were missing.
I found out, the dll's of the missing references were all located in the bin/debug folder. I moved them towards a neutral location, added them again to the project and the problem was solved.
As pointed out by Filburt. There were some broken reference paths in the project files. After correcting these paths, everything builds as expected.
Not sure how they got broken to begin with though. Any thoughts?
I was facing the same issue when I changed from Debug to release mode. I was trying different suggestions posted above but nothing has solved the issue. However, for me, when I did right click on Reference > Migrate packages.config to PackageReference... select OK, it started working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With