-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Error CS2044: /sourcelink switch is only supported when emitting PDB, error CS2045: /embed switch is only supported when emitting a PDB., Java SDK default drop to version 1.8.0 #8837
Comments
Hey, we will take a look |
I was able to fix the Error CS2044 and error CS2045. After research, we can see the difference in 2 runs. image version: '20231115.2.0'image version: '20231029.1.0'In my case, one of the dependent projects had no release configuration, debug only. Another project was fixed when i add
|
I can confirm this broke all of our Xamarin Android builds with the following error:
We don't use the task. We use raw MSBuild. Here's an internal link: |
Hello! The xamarin components of VS 17.8 started to require JDK 11 it seems, the default JDK version on the windows-2022 image is 8 so that's why you started seeing this error. You should not rely on the JDK version image set as default and did right with |
I've confirmed that running the |
Description
After release 20231115.2.0 my Android build started falling.
The reason: the Java SDK for default became Java SDK version 1.8.0
Image version: '20231115.2.0'
Image version: '20231029.1.0'
The first problem I am working around is setting up Java SDK version manually.

After fix, we started to see other problems during the production Android build.
CSC : error CS2044: /sourcelink switch is only supported when emitting PDB. [D:\a\1\s\************************.csproj]
CSC : error CS2045: /embed switch is only supported when emitting a PDB. [D:\a\1\s\*************************.csproj]
There are no changes in the source code between builds.
Some default settings are missing in the new image.
Platforms affected
Runner images affected
Image version and build link
20231115.2.0
Is it regression?
20231029.1.0
Expected behavior
Remove default flag PDB for - task: XamarinAndroid@1
Actual behavior
Flag is enabled PDB for - task: XamarinAndroid@1
Repro steps
The text was updated successfully, but these errors were encountered: