Projemi birkaç gündür publish etmiyordum. Bugün publish etmek istediğimde şöyle bir hata mesajı ile karşılaştım.

Ayrıca Error List alanında da şu şekilde bir hata mevcuttu;
Microsoft.Net.Compilers is only supported on MSBuild v16.3 and above
Fakat projem derleniyordu ve hiçbir sorun yoktu. Sorunu biraz araştırdığımda Microsoft.Net.Compilers 3.4.0 paketinden kaynaklandığını öğrendim. Yeni versiyonda bazı değişiklikler olmuş ve MSBuildToolsVersion deyimi deprecated olarak işaretlenmiş ve artık onun yerine MSBuildVersion kullanmamız isteniyormuş.
Packages altında yer alan Microsoft.Net.Compilers.props dosyasında aşağıda işaretlenmiş olan MSBuildToolsVersion deyimini MSBuildVersion ile değiştirdim ve publish sırasında yaşadığım derleme problemi çözüldü.

Eğer sorununuz çözülmezse bana mantıklı gelen ve işe yarayacağını düşündüğüm şu yöntemleri de deneyebilirsiniz;
1- Yukarıdaki resimde yer alan target alanının tamamını yorum satırı haline getirmek ya da silmek.
2- Microsoft.Net.Compilers 3.4.0 pakedini 3.3.1’e downgrade yapmak.
Kaynak:
https://github.com/dotnet/roslyn/issues/40130
https://github.com/dotnet/roslyn/pull/40349
Comments (4)
Justinsays:
12 Nisan 2020 at 07:09After looking at a few of the blog articles on your web site,
I truly like your technique of blogging. I added it
to my bookmark website list and will be checking back soon.
Keep up the good work!
Alexsays:
18 Nisan 2020 at 14:37Hello very cool web site!! Guy .. Beautiful ..
Wonderful .. I’ll bookmark your blog and take the feeds also?
I am happy to seek out numerous useful info right here in the publish, we want develop more techniques on this regard, thanks for sharing.
. . . . .
Royal CBDsays:
10 Mayıs 2020 at 19:39I do not even know how I ended up here, but I thought
this post was great. I do not know who you are but certainly you’re going to a
famous blogger if you are not already 😉 Cheers!
MEHMET MANSUR DEĞİRMENCİsays:
2 Nisan 2021 at 11:30Hocam bende aynı problemi yaşadım. IIS çalışırken publish edemiyoruz sorunumu IIS’si durdurduktan sonra publish ederek çözüyorum tabi ki benimkisi teknik bir bilgi değil kolay gelsin 🙂