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: |

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

What is Telegram?

Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.

telegram from sg


Telegram C# Programming Guide
FROM USA