Telegram Group & Telegram Channel
Forwarded from Easy Microservices (Ali Yousefi ˢᵒᶠᵗʷᵃʳᵉ ᴰᵉᵛᵉˡᵒᵖᵉʳ)
C# Programming Guide
یه کار عجیب و باحال کردیم. این فایل های sln رو میبینید که تهش نسخه ی دات نت رو زده؟ اگر هر کدوم از اینارو اجرا کنید سلوشن و کلیه پروژه های داخلش با اون نسخه از دات اجرا میشه بدون اینکه لازم باشه TargetFramework رو توی csproj ها دست بزنید. یعنی اگر فردا دات…
میتونید سورسش رو ایجا ببینید:
https://github.com/EasyMicroservices/Serialization

اما چطوری اینکار رو کردیم؟
توسط شرط هایی که توی csproj ها اضافه کردیم این قابلیت به سیستم اضافه شده:

  <Choose>
<When Condition="$(SolutionFileName.Contains('-net'))">
<PropertyGroup>
<TargetFramework>$(SolutionFileName.Split('-')[1].Replace('.sln',''))</TargetFramework>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net48;net452;net7.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>


اینجا بهش گفتیم اگر توی اسم سلوشن -net وجود داشت بیاد TargetFramework رو از توی اسم فایل استخراج کنه در غیر اینصورت اون TargetFramework های پیشفرض رو در نظر بگیره.

@easymicroservice
@easymicroservices
@csharptips



tg-me.com/CsharpTips/406
Create:
Last Update:

میتونید سورسش رو ایجا ببینید:
https://github.com/EasyMicroservices/Serialization

اما چطوری اینکار رو کردیم؟
توسط شرط هایی که توی csproj ها اضافه کردیم این قابلیت به سیستم اضافه شده:

  <Choose>
<When Condition="$(SolutionFileName.Contains('-net'))">
<PropertyGroup>
<TargetFramework>$(SolutionFileName.Split('-')[1].Replace('.sln',''))</TargetFramework>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net48;net452;net7.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>


اینجا بهش گفتیم اگر توی اسم سلوشن -net وجود داشت بیاد TargetFramework رو از توی اسم فایل استخراج کنه در غیر اینصورت اون TargetFramework های پیشفرض رو در نظر بگیره.

@easymicroservice
@easymicroservices
@csharptips

BY C# Programming Guide





Share with your friend now:
tg-me.com/CsharpTips/406

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

If riding a bucking bronco is your idea of fun, you’re going to love what the stock market has in store. Consider this past week’s ride a preview.The week’s action didn’t look like much, if you didn’t know better. The Dow Jones Industrial Average rose 213.12 points or 0.6%, while the S&P 500 advanced 0.5%, and the Nasdaq Composite ended little changed.

telegram from tw


Telegram C# Programming Guide
FROM USA